Skip to content

Commit c4eeb67

Browse files
Copilothsbt
authored andcommitted
[ruby/rubygems] Remove raise from stub to rely on flag for test assertions
ruby/rubygems@7ebc1abafd Co-authored-by: hsbt <12301+hsbt@users.noreply.github.com>
1 parent bf61731 commit c4eeb67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/rubygems/test_gem_commands_push_command.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def test_execute_attestation_skipped_on_non_rubygems_host
166166
@cmd.options[:args] = [@path]
167167

168168
attest_called = false
169-
@cmd.stub(:attest!, proc { attest_called = true; raise "attest! should not be called" }) do
169+
@cmd.stub(:attest!, proc { attest_called = true }) do
170170
@cmd.execute
171171
end
172172

@@ -189,7 +189,7 @@ def test_execute_attestation_skipped_on_jruby
189189
Object.const_set :RUBY_ENGINE, "jruby"
190190

191191
begin
192-
@cmd.stub(:attest!, proc { attest_called = true; raise "attest! should not be called" }) do
192+
@cmd.stub(:attest!, proc { attest_called = true }) do
193193
@cmd.execute
194194
end
195195

0 commit comments

Comments
 (0)