diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-09-11 00:54:43 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2014-09-11 00:54:43 -0300 |
commit | 53e877f7d9291b2bf0b8c425f9e32ef35829f35b (patch) | |
tree | 499c37c195c2d8dcd3fc9c71bfee92f4fc8986a1 /activesupport/lib/active_support | |
parent | 8edb5eeb360779aad7a45a66818fada98a22b1e2 (diff) | |
download | rails-53e877f7d9291b2bf0b8c425f9e32ef35829f35b.tar.gz rails-53e877f7d9291b2bf0b8c425f9e32ef35829f35b.tar.bz2 rails-53e877f7d9291b2bf0b8c425f9e32ef35829f35b.zip |
Define the configuration at Active Support
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 33139320fa..4c3e77b7fd 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -12,22 +12,18 @@ require 'active_support/core_ext/kernel/reporting' require 'active_support/deprecation' module ActiveSupport - class << self - delegate :test_order, :test_order=, to: :'ActiveSupport::TestCase' - end - class TestCase < ::Minitest::Test Assertion = Minitest::Assertion - @@test_order = nil - class << self def test_order=(new_order) - @@test_order = new_order + ActiveSupport.test_order = new_order end def test_order - if @@test_order.nil? + test_order = ActiveSupport.test_order + + if test_order.nil? ActiveSupport::Deprecation.warn "You did not specify a value for the " \ "configuration option 'active_support.test_order'. In Rails 5.0, " \ "the default value of this option will change from `:sorted` to " \ @@ -42,10 +38,11 @@ module ActiveSupport "Alternatively, you can opt into the future behavior by setting this " \ "option to `:random`." - @@test_order = :sorted + test_order = :sorted + self.test_order = test_order end - @@test_order + test_order end alias :my_tests_are_order_dependent! :i_suck_and_my_tests_are_order_dependent! |