aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-08-03 11:17:07 +0200
committerYves Senn <yves.senn@gmail.com>2015-08-03 11:17:07 +0200
commit465f0fbca3d4a1c269038b84ec9cc248fdab5fab (patch)
tree8f9d2561508de1c89d426893b5b44777c431e0c3 /railties/lib/rails
parentc402479f59e248056c87d547ee3ef8482354e917 (diff)
downloadrails-465f0fbca3d4a1c269038b84ec9cc248fdab5fab.tar.gz
rails-465f0fbca3d4a1c269038b84ec9cc248fdab5fab.tar.bz2
rails-465f0fbca3d4a1c269038b84ec9cc248fdab5fab.zip
test runner should crash with non existing file argument.
Before this patch, using `bin/rails test` with a non existing file or directory argument would silently swallow the argument and run the whole test suite. After the patch the command fails with `cannot load such file --`.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/test_unit/test_requirer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/test_requirer.rb b/railties/lib/rails/test_unit/test_requirer.rb
index 84c2256729..83d2c55ffd 100644
--- a/railties/lib/rails/test_unit/test_requirer.rb
+++ b/railties/lib/rails/test_unit/test_requirer.rb
@@ -18,7 +18,7 @@ module Rails
arg = arg.gsub(/:(\d+)?$/, '')
if Dir.exist?(arg)
"#{arg}/**/*_test.rb"
- elsif File.file?(arg)
+ else
arg
end
end