Created
July 21, 2009 08:10
-
-
Save amatsuda/151194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 871755d7d5653ddcf64fed1f758cbafaa91a3655 Mon Sep 17 00:00:00 2001 | |
From: Akira Matsuda <ronnie@dio.jp> | |
Date: Sun, 19 Jul 2009 14:36:44 +0900 | |
Subject: [PATCH] Ruby 1.9.2 compat: name method was renamed to __name__ since MiniTest 1.4.x | |
--- | |
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 d5282ba..c915bf7 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? | |
-- | |
1.6.3.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment