summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/binstubs_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/commands/binstubs_spec.rb')
-rw-r--r--spec/bundler/commands/binstubs_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb
index 92fa6812b0..4f310784c7 100644
--- a/spec/bundler/commands/binstubs_spec.rb
+++ b/spec/bundler/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" 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