Browse files

Ruby 1.9.2 compat: name method was renamed to __name__ since MiniTest…

… 1.4.x [#2922 state:resolved]

Signed-off-by: Yehuda Katz <wycats@gmail.com>
  • Loading branch information...
1 parent 7a427a8 commit be4d743645b47927b442ed2816ca0fa33421561e @amatsuda amatsuda committed with wycats Jul 19, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/test_case.rb
View
3 activesupport/lib/active_support/test_case.rb
@@ -17,7 +17,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?

0 comments on commit be4d743

Please sign in to comment.