diff options
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index baf33b4468..982f77d0e3 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -51,9 +51,10 @@ module Rails opt_parser.order!(args) - if arg = args.shift + options[:patterns] = [] + while arg = args.shift if Dir.exists?(arg) - options[:pattern] = "#{arg}/**/*_test.rb" + options[:patterns] << "#{arg}/**/*_test.rb" else options[:filename], options[:line] = arg.split(':') options[:filename] = File.expand_path options[:filename] @@ -102,8 +103,8 @@ module Rails def test_files return [@options[:filename]] if @options[:filename] - if @options[:pattern] - pattern = @options[:pattern] + if @options[:patterns] + pattern = @options[:patterns] else pattern = "test/**/*_test.rb" end |