mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
refactor ActiveSupport::TestCase.test_order method with memoization
This commit is contained in:
parent
21c74bd769
commit
bf501e7ff5
1 changed files with 1 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue