diff options
author | Jamis Buck <jamis@37signals.com> | 2006-03-07 22:04:23 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-03-07 22:04:23 +0000 |
commit | 24fca9d92ea9bef676f74259996c4039e014dfe2 (patch) | |
tree | 34ea3f29ddd6f7c50ecf564157a777b24e4dd4b5 /actionpack/lib/action_controller | |
parent | 4d4f0e6490e0523c4bf45e433e9d27ac9ce4da1e (diff) | |
download | rails-24fca9d92ea9bef676f74259996c4039e014dfe2.tar.gz rails-24fca9d92ea9bef676f74259996c4039e014dfe2.tar.bz2 rails-24fca9d92ea9bef676f74259996c4039e014dfe2.zip |
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
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/integration_test.rb | 12 |
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 |