mirror of https://github.com/rails/rails
allow running each test with pure ruby path/to/test.rb
also: - makes test dependencies obvious - makes tests runnable from within subfolders
This commit is contained in:
parent
6da2152d60
commit
203998c916
|
@ -7,7 +7,6 @@ task default: :test
|
|||
task :package
|
||||
|
||||
Rake::TestTask.new do |t|
|
||||
t.libs << "test"
|
||||
t.pattern = "test/**/*_test.rb"
|
||||
t.warning = true
|
||||
t.verbose = true
|
||||
|
@ -21,7 +20,7 @@ end
|
|||
namespace :test do
|
||||
task :isolated do
|
||||
Dir.glob("test/**/*_test.rb").all? do |file|
|
||||
sh(Gem.ruby, "-w", "-Ilib:test", file)
|
||||
sh(Gem.ruby, "-w", file)
|
||||
end || raise("Failures")
|
||||
end
|
||||
|
||||
|
@ -31,7 +30,6 @@ namespace :test do
|
|||
task("env:#{driver}") { ENV["REDIS_DRIVER"] = driver }
|
||||
|
||||
Rake::TestTask.new(driver => "env:#{driver}") do |t|
|
||||
t.libs << "test"
|
||||
t.test_files = ["test/cache/stores/redis_cache_store_test.rb"]
|
||||
t.warning = true
|
||||
t.verbose = true
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
ORIG_ARGV = ARGV.dup
|
||||
|
||||
require "bundler/setup"
|
||||
require "active_support/core_ext/kernel/reporting"
|
||||
|
||||
silence_warnings do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/actionable_error"
|
||||
|
||||
class ActionableErrorTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class ArrayInquirerTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class TestAutoloadModule < ActiveSupport::TestCase
|
||||
include ActiveSupport::Testing::Isolation
|
||||
|
@ -16,6 +16,11 @@ class TestAutoloadModule < ActiveSupport::TestCase
|
|||
def setup
|
||||
@some_class_path = File.expand_path("test/fixtures/autoload/some_class.rb")
|
||||
@another_class_path = File.expand_path("test/fixtures/autoload/another_class.rb")
|
||||
$LOAD_PATH << "test"
|
||||
end
|
||||
|
||||
def teardown
|
||||
$LOAD_PATH.pop
|
||||
end
|
||||
|
||||
test "the autoload module works like normal autoload" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class BenchmarkableTest < ActiveSupport::TestCase
|
||||
include ActiveSupport::Benchmarkable
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
module ActiveSupport
|
||||
class BroadcastLoggerTest < TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "dependencies_test_helpers"
|
||||
require_relative "../../dependencies_test_helpers"
|
||||
|
||||
module AutoloadingCacheBehavior
|
||||
include DependenciesTestHelpers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
|
||||
class CacheEntryTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
|
||||
class CacheKeyTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
|
||||
class CacheStoreLoggerTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
|
||||
class CacheStoreNamespaceTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require "dalli"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/cache"
|
||||
|
||||
module ActiveSupport
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require_relative "../behaviors"
|
||||
require "pathname"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require_relative "../behaviors"
|
||||
require "dalli"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require_relative "../behaviors"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require_relative "../behaviors"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/cache"
|
||||
require "active_support/cache/redis_cache_store"
|
||||
require_relative "../behaviors"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class GrandParent
|
||||
include ActiveSupport::Callbacks
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
module CallbacksTest
|
||||
class Record
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/dependencies"
|
||||
|
||||
module ActiveSupport
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class BacktraceCleanerFilterTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "stringio"
|
||||
require "active_support/logger"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/concern"
|
||||
|
||||
class ConcernTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "concurrent/atomic/count_down_latch"
|
||||
require "active_support/concurrency/load_interlock_aware_monitor"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/configurable"
|
||||
|
||||
class ConfigurableActiveSupport < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "dependencies_test_helpers"
|
||||
require_relative "dependencies_test_helpers"
|
||||
|
||||
module Ace
|
||||
module Base
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class AccessTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
require "active_support/core_ext/big_decimal"
|
||||
require "active_support/core_ext/hash"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
require "active_support/core_ext/hash"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class ExtractTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class GroupingTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class PrependAppendTest < ActiveSupport::TestCase
|
||||
def test_requiring_prepend_and_append_is_deprecated
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
|
||||
class WrapTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/big_decimal"
|
||||
|
||||
class BigDecimalTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/class/attribute"
|
||||
|
||||
class ClassAttributeTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/class"
|
||||
require "set"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
|
||||
module DateAndTimeBehavior
|
||||
def test_yesterday
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
|
||||
class DateAndTimeCompatibilityTest < ActiveSupport::TestCase
|
||||
include TimeZoneTestHelpers
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "core_ext/date_and_time_behavior"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../core_ext/date_and_time_behavior"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
|
||||
class DateExtCalculationsTest < ActiveSupport::TestCase
|
||||
def date_time_init(year, month, day, *args)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "core_ext/date_and_time_behavior"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../core_ext/date_and_time_behavior"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
|
||||
class DateTimeExtCalculationsTest < ActiveSupport::TestCase
|
||||
def date_time_init(year, month, day, hour, minute, second, usec = 0)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/digest/uuid"
|
||||
|
||||
class DigestUUIDExt < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/inflector"
|
||||
require "active_support/time"
|
||||
require "active_support/json"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
require "yaml"
|
||||
|
||||
class DurationTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/array"
|
||||
require "active_support/core_ext/enumerable"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/file"
|
||||
|
||||
class AtomicWriteTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/hash/indifferent_access"
|
||||
|
||||
class TransformValuesDeprecatedRequireTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/hash"
|
||||
require "bigdecimal"
|
||||
require "active_support/core_ext/string/access"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/integer"
|
||||
|
||||
class IntegerExtTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/kernel/concern"
|
||||
|
||||
class KernelConcernTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/kernel"
|
||||
|
||||
class KernelTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/load_error"
|
||||
|
||||
class TestLoadError < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/marshal"
|
||||
require "dependencies_test_helpers"
|
||||
require_relative "../dependencies_test_helpers"
|
||||
|
||||
class MarshalTest < ActiveSupport::TestCase
|
||||
include ActiveSupport::Testing::Isolation
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/anonymous"
|
||||
|
||||
class AnonymousTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/attr_internal"
|
||||
|
||||
class AttrInternalTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/attribute_accessors_per_thread"
|
||||
|
||||
class ModuleAttributeAccessorPerThreadTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/attribute_accessors"
|
||||
|
||||
class ModuleAttributeAccessorTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/aliasing"
|
||||
|
||||
module AttributeAliasing
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/concerning"
|
||||
|
||||
class ModuleConcerningTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/introspection"
|
||||
|
||||
module ParentA
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/module/remove_method"
|
||||
|
||||
module RemoveMethodTests
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/module"
|
||||
|
||||
Somewhere = Struct.new(:street, :city) do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/name_error"
|
||||
|
||||
class NameErrorTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "active_support/core_ext/numeric"
|
||||
require "active_support/core_ext/integer"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/date/acts_like"
|
||||
require "active_support/core_ext/time/acts_like"
|
||||
require "active_support/core_ext/date_time/acts_like"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object/blank"
|
||||
|
||||
class BlankTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object/deep_dup"
|
||||
|
||||
class DeepDupTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "bigdecimal"
|
||||
require "active_support/core_ext/object/duplicable"
|
||||
require "active_support/core_ext/numeric/time"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object/inclusion"
|
||||
|
||||
class InTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object/instance_variables"
|
||||
|
||||
class ObjectInstanceVariableTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
|
||||
# These test cases were added to test that cherry-picking the json extensions
|
||||
# works correctly, primarily for dependencies problems reported in #16131. They
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "json"
|
||||
require "json/encoding_test_cases"
|
||||
require_relative "../../json/encoding_test_cases"
|
||||
|
||||
# These test cases were added to test that we do not interfere with json gem's
|
||||
# output when the AS encoder is loaded, primarily for problems reported in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object/to_param"
|
||||
|
||||
class ToParamTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/ordered_hash"
|
||||
require "active_support/core_ext/object/to_query"
|
||||
require "active_support/core_ext/string/output_safety"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require "active_support/core_ext/object/try"
|
||||
require_relative "../../abstract_unit"
|
||||
require "active_support/core_ext/object"
|
||||
|
||||
class ObjectTryTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "active_support/core_ext/numeric"
|
||||
require "active_support/core_ext/range"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/regexp"
|
||||
|
||||
class RegexpExtAccessTests < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/core_ext/securerandom"
|
||||
|
||||
class SecureRandomTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "date"
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "timeout"
|
||||
require "inflector_test_cases"
|
||||
require "constantize_test_cases"
|
||||
require_relative "../inflector_test_cases"
|
||||
require_relative "../constantize_test_cases"
|
||||
|
||||
require "active_support/inflector"
|
||||
require "active_support/core_ext/string"
|
||||
|
@ -12,7 +12,7 @@ require "active_support/time"
|
|||
require "active_support/core_ext/string/output_safety"
|
||||
require "active_support/core_ext/string/indent"
|
||||
require "active_support/core_ext/string/strip"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
require "yaml"
|
||||
|
||||
class StringInflectionsTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "core_ext/date_and_time_behavior"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../core_ext/date_and_time_behavior"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
|
||||
class TimeExtCalculationsTest < ActiveSupport::TestCase
|
||||
def date_time_init(year, month, day, hour, minute, second, usec = 0)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/time"
|
||||
require "time_zone_test_helpers"
|
||||
require_relative "../time_zone_test_helpers"
|
||||
require "yaml"
|
||||
|
||||
class TimeWithZoneTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "uri"
|
||||
require "active_support/core_ext/uri"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class CurrentAttributesTest < ActiveSupport::TestCase
|
||||
Person = Struct.new(:id, :name, :time_zone)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "pp"
|
||||
require "active_support/dependencies"
|
||||
require "dependencies_test_helpers"
|
||||
require_relative "dependencies_test_helpers"
|
||||
|
||||
module ModuleWithMissing
|
||||
mattr_accessor :missing_count
|
||||
|
@ -21,11 +22,13 @@ class DependenciesTest < ActiveSupport::TestCase
|
|||
|
||||
setup do
|
||||
@loaded_features_copy = $LOADED_FEATURES.dup
|
||||
$LOAD_PATH << "test"
|
||||
end
|
||||
|
||||
teardown do
|
||||
ActiveSupport::Dependencies.clear
|
||||
$LOADED_FEATURES.replace(@loaded_features_copy)
|
||||
$LOAD_PATH.pop
|
||||
end
|
||||
|
||||
def test_depend_on_path
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/deprecation"
|
||||
|
||||
class MethodWrappersTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "../abstract_unit"
|
||||
require "active_support/deprecation"
|
||||
|
||||
class ProxyWrappersTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/testing/stream"
|
||||
|
||||
class Deprecatee
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/descendants_tracker"
|
||||
require "active_support/dependencies"
|
||||
require "descendants_tracker_test_cases"
|
||||
require_relative "descendants_tracker_test_cases"
|
||||
|
||||
class DescendantsTrackerWithAutoloadingTest < ActiveSupport::TestCase
|
||||
include DescendantsTrackerTestCases
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/descendants_tracker"
|
||||
require "descendants_tracker_test_cases"
|
||||
require_relative "descendants_tracker_test_cases"
|
||||
|
||||
class DescendantsTrackerWithoutAutoloadingTest < ActiveSupport::TestCase
|
||||
include DescendantsTrackerTestCases
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "openssl"
|
||||
|
||||
class DigestTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/encrypted_configuration"
|
||||
|
||||
class EncryptedConfigurationTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/encrypted_file"
|
||||
|
||||
class EncryptedFileTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "pathname"
|
||||
require "file_update_checker_shared_tests"
|
||||
require_relative "file_update_checker_shared_tests"
|
||||
|
||||
class EventedFileUpdateCheckerTest < ActiveSupport::TestCase
|
||||
include FileUpdateCheckerSharedTests
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class ExecutorTest < ActiveSupport::TestCase
|
||||
class DummyError < RuntimeError
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require "file_update_checker_shared_tests"
|
||||
require_relative "abstract_unit"
|
||||
require_relative "file_update_checker_shared_tests"
|
||||
|
||||
class FileUpdateCheckerTest < ActiveSupport::TestCase
|
||||
include FileUpdateCheckerSharedTests
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
|
||||
class ForkTrackerTest < ActiveSupport::TestCase
|
||||
def test_object_fork
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/core_ext/object/blank"
|
||||
|
||||
class GzipTest < ActiveSupport::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/core_ext/hash"
|
||||
require "bigdecimal"
|
||||
require "active_support/core_ext/string/access"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/time"
|
||||
require "active_support/core_ext/array/conversions"
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "abstract_unit"
|
||||
require_relative "abstract_unit"
|
||||
require "active_support/inflector"
|
||||
|
||||
require "inflector_test_cases"
|
||||
require "constantize_test_cases"
|
||||
require_relative "inflector_test_cases"
|
||||
require_relative "constantize_test_cases"
|
||||
|
||||
class InflectorTest < ActiveSupport::TestCase
|
||||
include InflectorTestCases
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue