diff --git a/test/unit/vagrant/bundler_test.rb b/test/unit/vagrant/bundler_test.rb index e81b314f9..69f425c66 100644 --- a/test/unit/vagrant/bundler_test.rb +++ b/test/unit/vagrant/bundler_test.rb @@ -781,7 +781,7 @@ describe Vagrant::Bundler do context "when bundler is not defined" do before { expect(Vagrant).to receive(:in_bundler?).and_return(false) } - context "when running within the installer" do + context "when running inside the installer" do before { expect(Vagrant).to receive(:in_installer?).and_return(true) } it "should load gem specification directories" do @@ -811,6 +811,15 @@ describe Vagrant::Bundler do end end end + + context "when running outside the installer" do + before { expect(Vagrant).to receive(:in_installer?).and_return(false) } + + it "should not load gem specification directories" do + expect(Gem::Specification).not_to receive(:dirs) + subject.send(:vagrant_internal_specs) + end + end end end