Nobody sucks so nobody should call this awful method name

上级 9424b48d
......@@ -55,4 +55,4 @@ def jruby_skip(message = '')
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.my_tests_are_order_dependent!
......@@ -501,4 +501,4 @@ def shutdown
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.my_tests_are_order_dependent!
......@@ -344,4 +344,4 @@ def jruby_skip(message = '')
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.my_tests_are_order_dependent!
......@@ -17,4 +17,4 @@
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.my_tests_are_order_dependent!
......@@ -205,4 +205,4 @@ def in_time_zone(zone)
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.tests_are_order_dependent!
* Fix ActiveSupport::TestCase not to order users' test cases by default.
If this change breaks your tests because your tests are order dependent, you need to explicitly call
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! at the top of your tests.
ActiveSupport::TestCase.my_tests_are_order_dependent! at the top of your tests.
*Akira Matsuda*
......
......@@ -15,6 +15,10 @@ module ActiveSupport
class TestCase < ::Minitest::Test
Assertion = Minitest::Assertion
class << self
alias :my_tests_are_order_dependent! :i_suck_and_my_tests_are_order_dependent!
end
alias_method :method_name, :name
include ActiveSupport::Testing::TaggedLogging
......
......@@ -42,4 +42,4 @@ def jruby_skip(message = '')
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
require 'active_support/test_case'
ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent!
ActiveSupport::TestCase.my_tests_are_order_dependent!
......@@ -30,7 +30,7 @@ def jruby_skip(message = '')
class ActiveSupport::TestCase
# FIXME: we have tests that depend on run order, we should fix that and
# remove this method call.
self.i_suck_and_my_tests_are_order_dependent!
self.my_tests_are_order_dependent!
private
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册