1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #20006 from vngrs/refactor_test_order_method

refactor ActiveSupport::TestCase.test_order method with memoization
This commit is contained in:
Rafael Mendonça França 2015-05-04 11:42:22 -03:00
commit 9619331001

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