diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index 8018ef9d02..33ba2788b4 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -58,7 +58,7 @@ module Rails private def extract_filters(argv) - argv.select { |arg| arg =~ /^\w+\// }.map do |path| + argv.select { |arg| arg =~ %r{^/?\w+/} }.map do |path| case when path =~ /(:\d+)+$/ file, *lines = path.split(":") @@ -66,11 +66,11 @@ module Rails file when Dir.exist?(path) "#{path}/**/*_test.rb" - else + when path !~ /\/$/ filters << [ path, [] ] path end - end + end.compact end end end |