From 084a3908fc96de0fb670899f081d796ae8b67b5a Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 6 Sep 2015 21:21:18 +0900 Subject: 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. --- railties/lib/rails/test_unit/test_requirer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/test_unit/test_requirer.rb') 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 -- cgit v1.2.3