From 891ecc63ac5c232081eea9597bbf366239707b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 15 Jan 2025 16:15:18 +0100 Subject: [PATCH] [rubygems/rubygems] Consistently assert command failure https://github.com/rubygems/rubygems/commit/faaa594a4a --- spec/bundler/cache/gems_spec.rb | 2 +- spec/bundler/install/gemfile/git_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/bundler/cache/gems_spec.rb b/spec/bundler/cache/gems_spec.rb index a694df2700..7563580aac 100644 --- a/spec/bundler/cache/gems_spec.rb +++ b/spec/bundler/cache/gems_spec.rb @@ -167,7 +167,7 @@ RSpec.describe "bundle cache" do G bundle :cache, raise_on_error: false - expect(exitstatus).to_not eq(0) + expect(last_command).to be_failure expect(err).to include("json-#{default_json_version} is built in to Ruby, and can't be cached") end end diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 83b3c06cbe..ada74c311c 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -1068,7 +1068,7 @@ RSpec.describe "bundle install with git sources" do gem "foo", :git => "#{lib_path("foo-1.0")}" G - expect(exitstatus).to_not eq(0) + expect(last_command).to be_failure expect(err).to include("Bundler could not install a gem because it " \ "needs to create a directory, but a file exists " \ "- #{default_bundle_path("bundler")}")