diff options
author | Andre Arko <andre@arko.net> | 2015-12-13 20:17:56 +0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-12-13 20:17:56 +0800 |
commit | 4c8a0f479ee9da79019907de43f7414bf820b250 (patch) | |
tree | 128d51df9830e323a9d647ed4af363b6804bb77e /spec/runtime | |
parent | 0113309648da399e59f9ea67a0500af49818ed7b (diff) | |
download | bundler-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.rb | 15 |
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 |