aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-09-06 21:21:18 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-09-07 08:13:50 +0900
commit084a3908fc96de0fb670899f081d796ae8b67b5a (patch)
tree05d41efb1cacf5c8b289e9145e7d701611b1c638 /railties/lib/rails
parentbc1f0c2e36ee705023dcbd513d99f834f8262ea3 (diff)
downloadrails-084a3908fc96de0fb670899f081d796ae8b67b5a.tar.gz
rails-084a3908fc96de0fb670899f081d796ae8b67b5a.tar.bz2
rails-084a3908fc96de0fb670899f081d796ae8b67b5a.zip
raise LoadError when a non-existent file or directory is specified to the test runner
Currently, if a file or directory that does not exist was specified in the test runner, that argument is ignored. This commit has been modified to cause an error if there is no file or directory.
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