aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/integration_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/integration_test.rb b/actionpack/lib/action_controller/integration_test.rb
index d4c1c85c22..5fce6183a4 100644
--- a/actionpack/lib/action_controller/integration_test.rb
+++ b/actionpack/lib/action_controller/integration_test.rb
@@ -405,12 +405,20 @@ module ActionController
# end
# end
class IntegrationTest < Test::Unit::TestCase
+ # Work around a bug in test/unit caused by the default test being named
+ # as a symbol (:default_test), which causes regex test filters
+ # (like "ruby test.rb -n /foo/") to fail because =~ doesn't work on
+ # symbols.
+ def initialize(name) #:nodoc:
+ super(name.to_s)
+ end
+
# Work around test/unit's requirement that every subclass of TestCase have
# at least one test method. Note that this implementation extends to all
# subclasses, as well, so subclasses of IntegrationTest may also exist
# without any test methods.
def run(*args) #:nodoc:
- return if @method_name == :default_test
+ return if @method_name == "default_test"
super
end
@@ -490,4 +498,4 @@ module ActionController
@integration_session.send(sym, *args, &block)
end
end
-end \ No newline at end of file
+end