Skip to content

Commit faaa594

Browse files
Consistently assert command failure
1 parent d1ccc9f commit faaa594

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bundler/spec/cache/gems_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
G
168168

169169
bundle :cache, raise_on_error: false
170-
expect(exitstatus).to_not eq(0)
170+
expect(last_command).to be_failure
171171
expect(err).to include("json-#{default_json_version} is built in to Ruby, and can't be cached")
172172
end
173173
end

bundler/spec/install/gemfile/git_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@
10681068
gem "foo", :git => "#{lib_path("foo-1.0")}"
10691069
G
10701070

1071-
expect(exitstatus).to_not eq(0)
1071+
expect(last_command).to be_failure
10721072
expect(err).to include("Bundler could not install a gem because it " \
10731073
"needs to create a directory, but a file exists " \
10741074
"- #{default_bundle_path("bundler")}")

0 commit comments

Comments
 (0)