diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-01-29 10:00:43 -0500 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-18 09:52:18 +0100 |
commit | b58c0914f4d85faa39f22eb3408970ac8a176913 (patch) | |
tree | 339361a7e1a084bd0ed3d563b4362e3c503ce2a1 /railties/lib/rails/test_unit | |
parent | 090c83672f333d6a4d87752ca1f980bfb6be6849 (diff) | |
download | rails-b58c0914f4d85faa39f22eb3408970ac8a176913.tar.gz rails-b58c0914f4d85faa39f22eb3408970ac8a176913.tar.bz2 rails-b58c0914f4d85faa39f22eb3408970ac8a176913.zip |
Run multiple files on runner
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 |