From ae48e960fc666c0782c40421d5aac0af0346243f Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 9 Mar 2021 08:06:10 -0800 Subject: [PATCH] Add test for behavior difference when running outside of installer --- test/unit/vagrant/bundler_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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