diff --git a/test/rubygems/test_bundled_ca.rb b/test/rubygems/test_bundled_ca.rb index ea6d0ca74a..47c1d34df5 100644 --- a/test/rubygems/test_bundled_ca.rb +++ b/test/rubygems/test_bundled_ca.rb @@ -15,7 +15,7 @@ require "rubygems/request" # The tested hosts are explained in detail here: https://github.com/rubygems/rubygems/commit/5e16a5428f973667cabfa07e94ff939e7a83ebd9 # -class TestBundledCA < Gem::TestCase +class TestGemBundledCA < Gem::TestCase def bundled_certificate_store store = OpenSSL::X509::Store.new diff --git a/test/rubygems/test_config.rb b/test/rubygems/test_config.rb index 8f8e1181c1..26f681328f 100644 --- a/test/rubygems/test_config.rb +++ b/test/rubygems/test_config.rb @@ -4,7 +4,7 @@ require_relative "helper" require "rubygems" require "shellwords" -class TestConfig < Gem::TestCase +class TestGemConfig < Gem::TestCase def test_datadir util_make_gems spec = Gem::Specification.find_by_name("a") diff --git a/test/rubygems/test_deprecate.rb b/test/rubygems/test_deprecate.rb index f009ea861d..d15de646a4 100644 --- a/test/rubygems/test_deprecate.rb +++ b/test/rubygems/test_deprecate.rb @@ -3,7 +3,7 @@ require_relative "helper" require "rubygems/deprecate" -class TestDeprecate < Gem::TestCase +class TestGemDeprecate < Gem::TestCase def setup super diff --git a/test/rubygems/test_exit.rb b/test/rubygems/test_exit.rb index 707150efaa..396837edad 100644 --- a/test/rubygems/test_exit.rb +++ b/test/rubygems/test_exit.rb @@ -3,7 +3,7 @@ require_relative "helper" require "rubygems" -class TestExit < Gem::TestCase +class TestGemExit < Gem::TestCase def test_exit system(*ruby_with_rubygems_in_load_path, "-e", "raise Gem::SystemExitException.new(2)") assert_equal 2, $?.exitstatus diff --git a/test/rubygems/test_kernel.rb b/test/rubygems/test_kernel.rb index 417e3ccadd..4c3d2d20c6 100644 --- a/test/rubygems/test_kernel.rb +++ b/test/rubygems/test_kernel.rb @@ -2,7 +2,7 @@ require_relative "helper" -class TestKernel < Gem::TestCase +class TestGemKernel < Gem::TestCase def setup super diff --git a/test/rubygems/test_project_sanity.rb b/test/rubygems/test_project_sanity.rb index 35a2bec7a2..7a7b779b08 100644 --- a/test/rubygems/test_project_sanity.rb +++ b/test/rubygems/test_project_sanity.rb @@ -3,7 +3,7 @@ require_relative "helper" require "open3" -class TestProjectSanity < Gem::TestCase +class TestGemProjectSanity < Gem::TestCase def setup end diff --git a/test/rubygems/test_remote_fetch_error.rb b/test/rubygems/test_remote_fetch_error.rb index d48bae474e..7efb98cecb 100644 --- a/test/rubygems/test_remote_fetch_error.rb +++ b/test/rubygems/test_remote_fetch_error.rb @@ -2,7 +2,7 @@ require_relative "helper" -class TestRemoteFetchError < Gem::TestCase +class TestGemRemoteFetchError < Gem::TestCase def test_password_redacted error = Gem::RemoteFetcher::FetchError.new("There was an error fetching", "https://user:secret@gemsource.org") refute_match %r{secret}, error.to_s diff --git a/test/rubygems/utilities.rb b/test/rubygems/utilities.rb index 2bd28d9a4b..17a55107b1 100644 --- a/test/rubygems/utilities.rb +++ b/test/rubygems/utilities.rb @@ -168,7 +168,7 @@ end # # Example: # -# HTTPResponseFactory.create( +# Gem::HTTPResponseFactory.create( # body: "", # code: 301, # msg: "Moved Permanently", @@ -176,7 +176,7 @@ end # ) # -class HTTPResponseFactory +class Gem::HTTPResponseFactory def self.create(body:, code:, msg:, headers: {}) response = Net::HTTPResponse.send(:response_class, code.to_s).new("1.0", code.to_s, msg) response.instance_variable_set(:@body, body) @@ -374,7 +374,7 @@ end # # This class was added to flush out problems in Rubinius' IO implementation. -class TempIO < Tempfile +class Gem::TempIO < Tempfile ## # Creates a new TempIO that will be initialized to contain +string+. @@ -393,3 +393,8 @@ class TempIO < Tempfile Gem.read_binary path end end + +class Gem::TestCase + TempIO = Gem::TempIO + HTTPResponseFactory = Gem::HTTPResponseFactory +end