Merge pull request #8248 from chrisroberts/fix/env-gems-path

Fix environment gems_path location
This commit is contained in:
Chris Roberts 2017-02-08 14:18:41 -08:00 committed by GitHub
commit e7e24ee853
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)
@boxes_path = @home_path.join("boxes")
@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")
@machine_index_dir = @data_dir.join("machine-index")

View File

@ -67,6 +67,13 @@ describe Vagrant::Environment do
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
it "is set to the home path given" do
Dir.mktmpdir("vagrant-test-env-home-path-given") do |dir|