From cb6abf551ab091760ec2c834ff3718f83efd5426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 16 Jul 2019 13:34:57 +0200 Subject: [bundler/bundler] Update error messages to be more precise https://github.com/bundler/bundler/commit/9ddeeb1fe1 --- spec/bundler/commands/binstubs_spec.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'spec') diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb index f4602c67c2..c8d45d489d 100644 --- a/spec/bundler/commands/binstubs_spec.rb +++ b/spec/bundler/commands/binstubs_spec.rb @@ -135,8 +135,8 @@ RSpec.describe "bundle binstubs " do it "runs the correct version of bundler" do sys_exec "#{bundled_app("bin/bundle")} install", "BUNDLER_VERSION" => "999.999.999" expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (999.999.999) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '999.999.999'`") + expect(err).to include("Activating bundler (~> 999.999) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 999.999'`") end end @@ -145,8 +145,8 @@ RSpec.describe "bundle binstubs " do lockfile lockfile.gsub(system_bundler_version, "999.999.999") sys_exec "#{bundled_app("bin/bundle")} install" expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (999.999.999) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '999.999.999'`") + expect(err).to include("Activating bundler (~> 999.999) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 999.999'`") end it "runs the correct version of bundler when the version is older and a different major" do @@ -154,8 +154,8 @@ RSpec.describe "bundle binstubs " do lockfile lockfile.gsub(system_bundler_version, "44.0") sys_exec "#{bundled_app("bin/bundle")} install" expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (44.0) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '44.0'`") + expect(err).to include("Activating bundler (~> 44.0) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 44.0'`") end it "runs the available version of bundler when the version is older and the same major" do @@ -163,7 +163,7 @@ RSpec.describe "bundle binstubs " do lockfile lockfile.gsub(system_bundler_version, "55.0") sys_exec "#{bundled_app("bin/bundle")} install" expect(exitstatus).not_to eq(42) if exitstatus - expect(err).not_to include("Activating bundler (55.0) failed:") + expect(err).not_to include("Activating bundler (~> 55.0) failed:") end it "runs the correct version of bundler when the version is a pre-release" do @@ -171,8 +171,8 @@ RSpec.describe "bundle binstubs " do lockfile lockfile.gsub(system_bundler_version, "2.12.0.a") sys_exec "#{bundled_app("bin/bundle")} install" expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (2.12.0.a) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '2.12.0.a'`") + expect(err).to include("Activating bundler (~> 2.12.a) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 2.12.a'`") end end @@ -187,8 +187,8 @@ RSpec.describe "bundle binstubs " do it "calls through to the explicit bundler version" do sys_exec "#{bundled_app("bin/bundle")} update --bundler=999.999.999" expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (999.999.999) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '999.999.999'`") + expect(err).to include("Activating bundler (~> 999.999) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 999.999'`") end end @@ -213,8 +213,8 @@ RSpec.describe "bundle binstubs " do it "attempts to load that version" do sys_exec bundled_app("bin/rackup").to_s expect(exitstatus).to eq(42) if exitstatus - expect(err).to include("Activating bundler (999.999.999) failed:"). - and include("To install the version of bundler this project requires, run `gem install bundler -v '999.999.999'`") + expect(err).to include("Activating bundler (~> 999.999) failed:"). + and include("To install the version of bundler this project requires, run `gem install bundler -v '~> 999.999'`") end end end -- cgit v1.2.3