diff options
author | Yusuke Endoh <[email protected]> | 2021-06-02 12:32:47 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-06-03 12:23:22 +0900 |
commit | b957c3dbcb3cfee6908f4217cfb9ab0e78b4c618 () | |
tree | bec7fb72365a4f9389eead36a20de848f2fb716f /test | |
parent | 28b481938b5c8211aad53ba82fe4ddd978ffc00f (diff) |
[rubygems/rubygems] Rename test/rubygems/test_{case,utilities}.rb to avoid "test_" prefix
This changes "test/rubygems/test_case.rb" to "test/rubygems/helper.rb", and "test/rubygems/test_utilities.rb" to "test/rubygems/utilities.rb". The two files are a helper for tests, not test files. However, a file starting with "test_" prefix is handled as a test file directly loaded by test-unit because Rakefile specifies: ``` t.test_files = FileList['test/**/test_*.rb'] ``` Directly loading test/rubygems/test_utilities.rb caused "uninitialized constant Gem::TestCase". This issue was fixed by 59c682097197fee4052b47e4b4ab86562f3eaa9b, but the fix caused a "circular require" warning because test_utilities.rb and test_case.rb are now requiring each other. Anyway, adding "test_" prefix to a test helper file is confusing, so this changeset reverts the fix and solve the issue by renaming them. https://.com/rubygems/rubygems/commit/6460e018df
128 files changed, 127 insertions, 128 deletions
@@ -1596,4 +1596,4 @@ class Object end end -require_relative 'test_utilities' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/installer' class Gem::Installer @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative '../test_case' require 'rubygems/package' ## @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'net/http' require 'rubygems/openssl' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems' require 'shellwords' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/deprecate' class TestDeprecate < Gem::TestCase @@ -1,5 +1,5 @@ # coding: US-ASCII -require_relative 'test_case' require 'rubygems' require 'rubygems/command' require 'rubygems/installer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/available_set' require 'rubygems/security' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemBundlerVersionFinder < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/command' class Gem::Command @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/command_manager' class TestGemCommandManager < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/build_command' require 'rubygems/package' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/cert_command' unless Gem::HAVE_OPENSSL @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/check_command' class TestGemCommandsCheckCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/cleanup_command' require 'rubygems/installer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/contents_command' class TestGemCommandsContentsCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/dependency_command' class TestGemCommandsDependencyCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/environment_command' class TestGemCommandsEnvironmentCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/package' require 'rubygems/security' require 'rubygems/commands/fetch_command' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/indexer' require 'rubygems/commands/generate_index_command' @@ -1,6 +1,6 @@ # frozen_string_literal: true require "rubygems" -require_relative "test_case" require "rubygems/commands/help_command" require "rubygems/package" require "rubygems/command_manager" @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/info_command' class TestGemCommandsInfoCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/install_command' require 'rubygems/request_set' require 'rubygems/rdoc' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/list_command' class TestGemCommandsListCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/lock_command' class TestGemCommandsLockCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/mirror_command' class TestGemCommandsMirrorCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/open_command' class TestGemCommandsOpenCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/outdated_command' class TestGemCommandsOutdatedCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/owner_command' class TestGemCommandsOwnerCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/pristine_command' class TestGemCommandsPristineCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/push_command' class TestGemCommandsPushCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/query_command' module TestGemCommandsQueryCommandSetup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/search_command' class TestGemCommandsSearchCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/server_command' class TestGemCommandsServerCommand < Gem::TestCase @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/setup_command' class TestGemCommandsSetupCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/signin_command' require 'rubygems/installer' @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/signout_command' require 'rubygems/installer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/sources_command' class TestGemCommandsSourcesCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/specification_command' class TestGemCommandsSpecificationCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/stale_command' class TestGemCommandsStaleCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/unpack_command' class TestGemCommandsUnpackCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/update_command' class TestGemCommandsUpdateCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/which_command' class TestGemCommandsWhichCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/commands/yank_command' class TestGemCommandsYankCommand < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/config_file' class TestGemConfigFile < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/dependency' class TestGemDependency < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/dependency_installer' require 'rubygems/security' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/dependency_list' class TestGemDependencyList < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemDependencyResolutionError < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/doctor' class TestGemDoctor < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/ext' require 'rubygems/installer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/ext' class TestGemExtCmakeBuilder < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/ext' class TestGemExtConfigureBuilder < Gem::TestCase @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/ext' class TestGemExtExtConfBuilder < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/ext' class TestGemExtRakeBuilder < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemGemRunner < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems' require 'rubygems/command' require 'rubygems/gemcutter_utilities' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemImpossibleDependenciesError < Gem::TestCase def test_message_conflict @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/indexer' class TestGemIndexer < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/local_remote_options' require 'rubygems/command' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/name_tuple' class TestGemNameTuple < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' unless Gem.java_platform? # jruby can't require the simple_gem file require 'rubygems/simple_gem' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems' begin @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems' require 'fileutils' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/platform' require 'rbconfig' @@ -1,6 +1,6 @@ # frozen_string_literal: true require 'rubygems' -require_relative 'test_case' require 'rubygems/rdoc' class TestGemRDoc < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'webrick' require 'webrick/https' if Gem::HAVE_OPENSSL @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request' require 'ostruct' require 'base64' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request' require 'timeout' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request_set' class TestGemRequestSet < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request_set' class TestGemRequestSetGemDependencyAPI < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request_set' require 'rubygems/request_set/lockfile' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request_set' require 'rubygems/request_set/lockfile' require 'rubygems/request_set/lockfile/tokenizer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/request_set' require 'rubygems/request_set/lockfile' require 'rubygems/request_set/lockfile/tokenizer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require "rubygems/requirement" class TestGemRequirement < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolver < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverActivationRequest < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverAPISet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverAPISpecification < Gem::TestCase def test_initialize @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverBestSet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverComposedSet < Gem::TestCase def test_errors @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverConflict < Gem::TestCase def test_explanation @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverDependencyRequest < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverGitSet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/installer' class TestGemResolverGitSpecification < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverIndexSet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/available_set' class TestGemResolverIndexSpecification < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverInstalledSpecification < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverInstallerSet < Gem::TestCase def test_add_always_install @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/available_set' class TestGemResolverLocalSpecification < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverLockSet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/installer' require 'rubygems/resolver' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverRequirementList < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverSpecification < Gem::TestCase class TestSpec < Gem::Resolver::Specification @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverVendorSet < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemResolverVendorSpecification < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/security' unless Gem::HAVE_OPENSSL @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'test_case' unless Gem::HAVE_OPENSSL warn 'Skipping Gem::Security::Policy tests. openssl not found.' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' unless Gem::HAVE_OPENSSL warn 'Skipping Gem::Security::Signer tests. openssl not found.' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' unless Gem::HAVE_OPENSSL warn 'Skipping Gem::Security::TrustDir tests. openssl not found.' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/server' require 'stringio' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/user_interaction' require 'timeout' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' require 'rubygems/indexer' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemSourceFetchProblem < Gem::TestCase def test_exception @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' class TestGemSourceGit < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' class TestGemSourceInstalled < Gem::TestCase @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'rubygems' require 'rubygems/source_list' -require_relative 'test_case' class TestGemSourceList < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' require 'fileutils' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemSourceLock < Gem::TestCase def test_fetch_spec @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' class TestGemSourceSpecificFile < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require 'rubygems/test_case' require 'rubygems/source' class TestGemSourceSubpathProblem < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/source' class TestGemSourceVendor < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/spec_fetcher' class TestGemSpecFetcher < Gem::TestCase @@ -1,6 +1,6 @@ # frozen_string_literal: true require 'benchmark' -require_relative 'test_case' require 'date' require 'pathname' require 'stringio' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/user_interaction' require 'timeout' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative "test_case" require "rubygems/stub_specification" class TestStubSpecification < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require "rubygems/text" class TestGemText < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestGemUnsatisfiableDependencyError < Gem::TestCase def setup @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/uri_formatter' class TestGemUriFormatter < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/util' class TestGemUtil < Gem::TestCase @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "test_case" require "rubygems/validator" class TestGemValidator < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require "rubygems/version" class TestGemVersion < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems/command' require 'rubygems/version_option' @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestKernel < Gem::TestCase def setup @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "test_case" require "open3" class TestProjectSanity < Gem::TestCase @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' class TestRemoteFetchError < Gem::TestCase def test_password_redacted @@ -1,5 +1,5 @@ # frozen_string_literal: true -require_relative 'test_case' require 'rubygems' class TestGemRequire < Gem::TestCase @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'tempfile' require 'rubygems' -require_relative 'test_case' require 'rubygems/remote_fetcher' ## |