diff options
Diffstat (limited to 'spec/commands/binstubs_spec.rb')
-rw-r--r-- | spec/commands/binstubs_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 3f62f17b45..77f23b9a2f 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -70,7 +70,7 @@ RSpec.describe "bundle binstubs <gem>" do bundle "binstubs rack", :all => true expect(last_command).to be_failure - expect(last_command.bundler_err).to include("Cannot specify --all with specific gems") + expect(err).to include("Cannot specify --all with specific gems") end context "when generating bundle binstub outside bundler" do @@ -88,7 +88,7 @@ RSpec.describe "bundle binstubs <gem>" do sys_exec "bin/rackup" - expect(last_command.stderr).to include("was not generated by Bundler") + expect(err).to include("was not generated by Bundler") end end @@ -135,7 +135,7 @@ RSpec.describe "bundle binstubs <gem>" 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(last_command.stderr).to include("Activating bundler (999.999.999) failed:"). + 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'`") end end @@ -145,7 +145,7 @@ RSpec.describe "bundle binstubs <gem>" 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(last_command.stderr).to include("Activating bundler (999.999.999) failed:"). + 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'`") end @@ -154,7 +154,7 @@ RSpec.describe "bundle binstubs <gem>" do lockfile lockfile.gsub(system_bundler_version, "44.0") sys_exec "#{bundled_app("bin/bundle")} install" expect(exitstatus).to eq(42) if exitstatus - expect(last_command.stderr).to include("Activating bundler (44.0) failed:"). + 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 @@ -163,7 +163,7 @@ RSpec.describe "bundle binstubs <gem>" 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(last_command.stderr).to include("Activating bundler (2.12.0.a) failed:"). + 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'`") end end @@ -173,13 +173,13 @@ RSpec.describe "bundle binstubs <gem>" do it "calls through to the latest bundler version" do sys_exec! "#{bundled_app("bin/bundle")} update --bundler" - expect(last_command.stdout).to eq %(system bundler #{system_bundler_version}\n["update", "--bundler"]) + expect(out).to eq %(system bundler #{system_bundler_version}\n["update", "--bundler"]) end 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(last_command.stderr).to include("Activating bundler (999.999.999) failed:"). + 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'`") end end @@ -205,7 +205,7 @@ RSpec.describe "bundle binstubs <gem>" do it "attempts to load that version", :ruby_repo do sys_exec bundled_app("bin/rackup").to_s expect(exitstatus).to eq(42) if exitstatus - expect(last_command.stderr).to include("Activating bundler (999.999.999) failed:"). + 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'`") end end |