diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 22:43:06 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:58:41 -0300 |
commit | 5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d (patch) | |
tree | 10bf805944a56aa0a225419a76a78246b5ab94b5 /activesupport/lib | |
parent | d6e06ea8275cdc3f126f926ed9b5349fde374b10 (diff) | |
download | rails-5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d.tar.gz rails-5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d.tar.bz2 rails-5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d.zip |
Change the default test order from `:sorted` to `:random`
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 98b68455ab..aa71db3c56 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -31,29 +31,15 @@ module ActiveSupport # Returns the order in which test cases are run. # - # ActiveSupport::TestCase.test_order # => :sorted + # ActiveSupport::TestCase.test_order # => :random # # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. - # Defaults to +:sorted+. + # Defaults to +:random+. def test_order 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, " \ - "the default value of this option will change from `:sorted` to " \ - "`:random`.\n" \ - "To disable this warning and keep the current behavior, you can add " \ - "the following line to your `config/environments/test.rb`:\n" \ - "\n" \ - " Rails.application.configure do\n" \ - " config.active_support.test_order = :sorted\n" \ - " end\n" \ - "\n" \ - "Alternatively, you can opt into the future behavior by setting this " \ - "option to `:random`." - - test_order = :sorted + test_order = :random self.test_order = test_order end |