1
0
Fork 0
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:
Mehmet Emin İNAÇ 2015-05-04 14:46:12 +03:00
parent 21c74bd769
commit bf501e7ff5

View file

@ -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