From bc3956c0d50630e6d537e3d3374671ed5e4e1f28 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 3 Aug 2015 13:42:30 +0200 Subject: Revert "test runner should crash with non existing file argument." This reverts commit 465f0fbca3d4a1c269038b84ec9cc248fdab5fab. This breaks some cases where non file / directory arguments are passed to the runner (for example db:migrate). I still think that we can get this to work. From what I can tell there is no reason why db:migrate is passed along to `Minitest.run`. I'll revert and investigate possible solutions. --- 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 83d2c55ffd..84c2256729 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" - else + elsif File.file?(arg) arg end end -- cgit v1.2.3