aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-08-03 13:42:30 +0200
committerYves Senn <yves.senn@gmail.com>2015-08-03 13:42:30 +0200
commitbc3956c0d50630e6d537e3d3374671ed5e4e1f28 (patch)
tree41617641177fcdafe5c471f81c378b77a421295d /railties
parent63c03077f3049b538b4cfb2fe1035bf1c0a58ddd (diff)
downloadrails-bc3956c0d50630e6d537e3d3374671ed5e4e1f28.tar.gz
rails-bc3956c0d50630e6d537e3d3374671ed5e4e1f28.tar.bz2
rails-bc3956c0d50630e6d537e3d3374671ed5e4e1f28.zip
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.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/test_unit/test_requirer.rb2
-rw-r--r--railties/test/application/test_runner_test.rb5
2 files changed, 1 insertions, 6 deletions
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
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb
index d0a7960d3f..494e6dd7bd 100644
--- a/railties/test/application/test_runner_test.rb
+++ b/railties/test/application/test_runner_test.rb
@@ -307,11 +307,6 @@ module ApplicationTests
end
end
- def test_crash_with_non_existing_file_or_dirname
- error = capture(:stderr) { run_test_command('test/nope/niet_test.rb') }
- assert_match(%r{cannot load such file.+test/nope/niet_test.rb}, error)
- end
-
def test_shows_filtered_backtrace_by_default
create_backtrace_test