diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-06-08 01:40:23 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-06-10 01:42:17 -0500 |
commit | 848d33ca47805fd6817cc301dc82ac1bc3924046 (patch) | |
tree | e7e23ad78cf65d54e7612213e459df5cf80b39aa /spec/other | |
parent | d61ab01f5a5370a6873130c13272c515fa76b6af (diff) | |
download | bundler-848d33ca47805fd6817cc301dc82ac1bc3924046.tar.gz |
Fail gracefully when installing bundler fails
Diffstat (limited to 'spec/other')
-rw-r--r-- | spec/other/trampoline_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb index 9a76819f..41a06c51 100644 --- a/spec/other/trampoline_spec.rb +++ b/spec/other/trampoline_spec.rb @@ -69,6 +69,16 @@ describe "bundler version trampolining" do expect(out).to eq("Bundler version 1.12.3") expect(system_gem_path.join("gems", "bundler-1.12.3")).to exist end + + it "fails gracefully when installing the bundler fails" do + ENV["BUNDLER_VERSION"] = "9999" + bundle "--version", :expect_err => true + expect(err).to eq(<<-E.strip) +Installing the inferred bundler version (= 9999) failed. +If you'd like to update to the current bundler version (1.12.5) in this project, run `bundle update --bundler`. +The error was: Unable to resolve dependency: user requested 'bundler (= 9999)' + E + end end context "bundle update --bundler" do |