test/rubygems/test_gem_request.rb in rubygems-update-2.7.11 vs test/rubygems/test_gem_request.rb in rubygems-update-3.0.0

- old
+ new

@@ -2,11 +2,11 @@ require 'rubygems/test_case' require 'rubygems/request' require 'ostruct' require 'base64' -unless defined?(OpenSSL::SSL) then +unless defined?(OpenSSL::SSL) warn 'Skipping Gem::Request tests. openssl not found.' end class TestGemRequest < Gem::TestCase @@ -15,11 +15,11 @@ EXPIRED_CERT = load_cert 'expired' PUBLIC_CERT = load_cert 'public' PUBLIC_CERT_FILE = cert_path 'public' SSL_CERT = load_cert 'ssl' - def make_request uri, request_class, last_modified, proxy + def make_request(uri, request_class, last_modified, proxy) Gem::Request.create_with_proxy uri, request_class, last_modified, proxy end def setup @proxies = %w[http_proxy https_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY] @@ -440,11 +440,11 @@ error_number = OpenSSL::X509::V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE message = Gem::Request.verify_certificate_message error_number, EXPIRED_CERT - assert_equal "You must add #{EXPIRED_CERT.issuer} to your local trusted store", + assert_equal "Cannot verify certificate issued by #{EXPIRED_CERT.issuer}", message end def util_restore_version Object.send :remove_const, :RUBY_ENGINE if defined?(RUBY_ENGINE) @@ -463,11 +463,11 @@ @orig_RUBY_ENGINE = RUBY_ENGINE if defined? RUBY_ENGINE @orig_RUBY_PATCHLEVEL = RUBY_PATCHLEVEL @orig_RUBY_REVISION = RUBY_REVISION if defined? RUBY_REVISION end - def util_stub_net_http hash + def util_stub_net_http(hash) old_client = Gem::Request::ConnectionPools.client conn = Conn.new OpenStruct.new(hash) Gem::Request::ConnectionPools.client = conn yield conn ensure @@ -475,10 +475,10 @@ end class Conn attr_accessor :payload - def new *args; self; end + def new(*args); self; end def use_ssl=(bool); end def verify_callback=(setting); end def verify_mode=(setting); end def cert_store=(setting); end def start; end