1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jamis Buck 2006-03-07 22:04:23 +00:00
parent 4d4f0e6490
commit 24fca9d92e

View file

@ -405,12 +405,20 @@ module ActionController
# end # end
# end # end
class IntegrationTest < Test::Unit::TestCase 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 # Work around test/unit's requirement that every subclass of TestCase have
# at least one test method. Note that this implementation extends to all # at least one test method. Note that this implementation extends to all
# subclasses, as well, so subclasses of IntegrationTest may also exist # subclasses, as well, so subclasses of IntegrationTest may also exist
# without any test methods. # without any test methods.
def run(*args) #:nodoc: def run(*args) #:nodoc:
return if @method_name == :default_test return if @method_name == "default_test"
super super
end end