aboutsummaryrefslogtreecommitdiffstats
path: root/spec/runtime
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-12-13 20:17:56 +0800
committerAndre Arko <andre@arko.net>2015-12-13 20:17:56 +0800
commit4c8a0f479ee9da79019907de43f7414bf820b250 (patch)
tree128d51df9830e323a9d647ed4af363b6804bb77e /spec/runtime
parent0113309648da399e59f9ea67a0500af49818ed7b (diff)
downloadbundler-4c8a0f479ee9da79019907de43f7414bf820b250.tar.gz
fix #4149 by (again) waiting to load Psych
also add a new test specifically to catch if Psych is ever loaded by bundler/setup in the future
Diffstat (limited to 'spec/runtime')
-rw-r--r--spec/runtime/setup_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 4f0d3953..7e205ca5 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -954,4 +954,19 @@ describe "Bundler.setup" do
end
end
end
+
+ describe "when Psych is not in the Gemfile", :ruby => "~> 2.2" do
+ it "does not load Psych" do
+ gemfile ""
+ ruby <<-RUBY
+ require 'bundler/setup'
+ puts defined?(Psych::VERSION) ? Psych::VERSION : "undefined"
+ require 'psych'
+ puts Psych::VERSION
+ RUBY
+ pre_bundler, post_bundler = out.split("\n")
+ expect(pre_bundler).to eq("undefined")
+ expect(post_bundler).to match(/\d+\.\d+\.\d+/)
+ end
+ end
end