aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-12 10:51:41 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-12 10:51:41 -0300
commite81f3c210eca074ed6227bd1c40835d44761c09e (patch)
tree8b29d0d06f0cfcc6ebac3d3a401508b4d80f3f77 /activesupport
parent9424b48d39fc2f646f34ffb088568a148313c0e8 (diff)
downloadrails-e81f3c210eca074ed6227bd1c40835d44761c09e.tar.gz
rails-e81f3c210eca074ed6227bd1c40835d44761c09e.tar.bz2
rails-e81f3c210eca074ed6227bd1c40835d44761c09e.zip
Nobody sucks so nobody should call this awful method name
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG.md2
-rw-r--r--activesupport/lib/active_support/test_case.rb4
-rw-r--r--activesupport/test/abstract_unit.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 4ee70ebd30..b961b373cb 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,6 +1,6 @@
* 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*
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index 154c8e5d14..0df599b692 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -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
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index e29a248aa0..52fbaf8a85 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -42,4 +42,4 @@ require 'mocha/setup' # FIXME: stop using mocha
# 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!