Permalink
Browse files

Make Default Test work with both ruby 1.8.4 and 1.8.6. [DrMark] Closes

…#10003

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2a74d71 commit 56fec2f26906f996c3eb40d55fd74276928e478b @NZKoz NZKoz committed Oct 26, 2007
Showing with 8 additions and 1 deletion.
  1. +2 −1 activesupport/lib/active_support/testing/default.rb
  2. +6 −0 activesupport/test/test_test.rb
@@ -2,7 +2,8 @@ module ActiveSupport
module Testing
module Default
def run(*args)
- return if method_name == :default_test
+ #method_name appears to be a symbol on 1.8.4 and a string on 1.8.6
+ return if @method_name.to_s == "default_test"
super
end
end
@@ -63,3 +63,9 @@ def test_array_of_expressions
def default_test; end
end
end
+
+# This should always pass
+
+class NotTestingThingsTest < Test::Unit::TestCase
+ include ActiveSupport::Testing::Default
+end

0 comments on commit 56fec2f

Please sign in to comment.