From 24fca9d92ea9bef676f74259996c4039e014dfe2 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Tue, 7 Mar 2006 22:04:23 +0000 Subject: make integration testing not interfere with command-line regex test filters git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/integration_test.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/integration_test.rb') 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 -- cgit v1.2.3