diff options
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index d5282bad6a..c915bf799d 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -19,7 +19,8 @@ module ActiveSupport class TestCase < ::Test::Unit::TestCase if defined? MiniTest Assertion = MiniTest::Assertion - alias_method :method_name, :name + alias_method :method_name, :name if method_defined? :name + alias_method :method_name, :__name__ if method_defined? :__name__ else # TODO: Figure out how to get the Rails::BacktraceFilter into minitest/unit if defined?(Rails) && ENV['BACKTRACE'].nil? |