Fix environment gems_path location

This commit is contained in:
Chris Roberts 2017-02-01 12:43:16 -08:00
parent b63d6bac1a
commit 959bdada82
2 changed files with 8 additions and 1 deletions

View File

@ -121,7 +121,7 @@ module Vagrant
@home_path = Util::Platform.fs_real_path(@home_path) @home_path = Util::Platform.fs_real_path(@home_path)
@boxes_path = @home_path.join("boxes") @boxes_path = @home_path.join("boxes")
@data_dir = @home_path.join("data") @data_dir = @home_path.join("data")
@gems_path = @home_path.join("gems") @gems_path = Vagrant::Bundler.instance.plugin_gem_path
@tmp_path = @home_path.join("tmp") @tmp_path = @home_path.join("tmp")
@machine_index_dir = @data_dir.join("machine-index") @machine_index_dir = @data_dir.join("machine-index")

View File

@ -67,6 +67,13 @@ describe Vagrant::Environment do
end end
end end
describe "#gems_path" do
it "is set to Vagrant::Bundler defined path" do
instance = described_class.new
expect(instance.gems_path).to eq(Vagrant::Bundler.instance.plugin_gem_path)
end
end
describe "#home_path" do describe "#home_path" do
it "is set to the home path given" do it "is set to the home path given" do
Dir.mktmpdir("vagrant-test-env-home-path-given") do |dir| Dir.mktmpdir("vagrant-test-env-home-path-given") do |dir|