summaryrefslogtreecommitdiff
path: root/spec/bundler/commands
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-06-05 10:52:37 +0200
committerHiroshi SHIBATA <[email protected]>2025-06-06 10:09:14 +0900
commitd95f7a3c43fb2014e5865ab6bc01dd4ac6d26c79 (patch)
tree3dc341ceb8058579ed10c278bc4ba359a303745c /spec/bundler/commands
parentee55b82b34017051e6854a7940efc1615a693242 (diff)
[rubygems/rubygems] Extract stdboth spec helper
https://github.com/rubygems/rubygems/commit/bb13f4e702
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r--spec/bundler/commands/install_spec.rb4
-rw-r--r--spec/bundler/commands/newgem_spec.rb2
-rw-r--r--spec/bundler/commands/update_spec.rb10
3 files changed, 8 insertions, 8 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 3c8df46248..41aa903f27 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -260,7 +260,7 @@ RSpec.describe "bundle install with gem sources" do
gem "myrack"
G
- expect(last_command.stdboth).to include(plugin_msg)
+ expect(stdboth).to include(plugin_msg)
end
describe "with a gem that installs multiple platforms" do
@@ -722,7 +722,7 @@ RSpec.describe "bundle install with gem sources" do
gem "ajp-rails", "0.0.0"
G
- expect(last_command.stdboth).not_to match(/Error Report/i)
+ expect(stdboth).not_to match(/Error Report/i)
expect(err).to include("An error occurred while installing ajp-rails (0.0.0), and Bundler cannot continue.").
and include("Bundler::APIResponseInvalidDependenciesError")
end
diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb
index 18515ee42f..dd2aa5c8c4 100644
--- a/spec/bundler/commands/newgem_spec.rb
+++ b/spec/bundler/commands/newgem_spec.rb
@@ -529,7 +529,7 @@ RSpec.describe "bundle gem" do
system_gems gems, path: path, gem_repo: gem_repo2
bundle "exec rake build", dir: bundled_app("newgem")
- expect(last_command.stdboth).not_to include("ERROR")
+ expect(stdboth).not_to include("ERROR")
end
context "gem naming with relative paths" do
diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb
index d4fdc56037..e3624ca04d 100644
--- a/spec/bundler/commands/update_spec.rb
+++ b/spec/bundler/commands/update_spec.rb
@@ -1140,7 +1140,7 @@ RSpec.describe "bundle update in more complicated situations" do
end
bundle "update thin myrack-obama"
- expect(last_command.stdboth).to include "Bundler attempted to update myrack-obama but its version stayed the same"
+ expect(stdboth).to include "Bundler attempted to update myrack-obama but its version stayed the same"
expect(the_bundle).to include_gems "thin 2.0", "myrack 10.0", "myrack-obama 1.0"
end
@@ -1158,7 +1158,7 @@ RSpec.describe "bundle update in more complicated situations" do
bundle "update foo"
- expect(last_command.stdboth).not_to include "attempted to update"
+ expect(stdboth).not_to include "attempted to update"
end
it "will not warn when changing gem sources but not versions" do
@@ -1176,7 +1176,7 @@ RSpec.describe "bundle update in more complicated situations" do
bundle "update myrack"
- expect(last_command.stdboth).not_to include "attempted to update"
+ expect(stdboth).not_to include "attempted to update"
end
it "will update only from pinned source" do
@@ -1266,7 +1266,7 @@ RSpec.describe "bundle update in more complicated situations" do
it "is not updated because it is not actually included in the bundle" do
simulate_platform "x86_64-linux" do
bundle "update a"
- expect(last_command.stdboth).to include "Bundler attempted to update a but it was not considered because it is for a different platform from the current one"
+ expect(stdboth).to include "Bundler attempted to update a but it was not considered because it is for a different platform from the current one"
expect(the_bundle).to_not include_gem "a"
end
end
@@ -1307,7 +1307,7 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler"
it "should explain that bundler conflicted and how to resolve the conflict" do
bundle "update", all: true, raise_on_error: false
- expect(last_command.stdboth).not_to match(/in snapshot/i)
+ expect(stdboth).not_to match(/in snapshot/i)
expect(err).to match(/current Bundler version/i).
and match(/Install the necessary version with `gem install bundler:9\.9\.9`/i)
end