diff options
author | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-04 14:46:12 +0300 |
---|---|---|
committer | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-04 14:46:12 +0300 |
commit | bf501e7ff5f66da631bff280d3af2605e5309b85 (patch) | |
tree | 600c08c17f63a141f658965ed5917a196852d4df | |
parent | 21c74bd769f6c873453e9244b0de7ced40a532be (diff) | |
download | rails-bf501e7ff5f66da631bff280d3af2605e5309b85.tar.gz rails-bf501e7ff5f66da631bff280d3af2605e5309b85.tar.bz2 rails-bf501e7ff5f66da631bff280d3af2605e5309b85.zip |
refactor ActiveSupport::TestCase.test_order method with memoization
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 24b8f4b9f9..d9a668c0ea 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -36,14 +36,7 @@ module ActiveSupport # Possible values are +:random+, +:parallel+, +:alpha+, +:sorted+. # Defaults to +:random+. def test_order - test_order = ActiveSupport.test_order - - if test_order.nil? - test_order = :random - self.test_order = test_order - end - - test_order + ActiveSupport.test_order ||= :random end end |