diff options
Diffstat (limited to 'test/rubygems/test_gem_commands_push_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_push_command.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb index 185d3cc1fc..955dc7ced3 100644 --- a/test/rubygems/test_gem_commands_push_command.rb +++ b/test/rubygems/test_gem_commands_push_command.rb @@ -372,10 +372,10 @@ class TestGemCommandsPushCommand < Gem::TestCase response_fail = "You have enabled multifactor authentication but your request doesn't have the correct OTP code. Please check it and retry." response_success = 'Successfully registered gem: freewill (1.0.0)' - @fetcher.data["#{Gem.host}/api/v1/gems"] = proc do - @call_count ||= 0 - (@call_count += 1).odd? ? [response_fail, 401, 'Unauthorized'] : [response_success, 200, 'OK'] - end + @fetcher.data["#{Gem.host}/api/v1/gems"] = [ + [response_fail, 401, 'Unauthorized'], + [response_success, 200, 'OK'] + ] @otp_ui = Gem::MockGemUi.new "111111\n" use_ui @otp_ui do |