aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-11-12 21:39:58 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2015-11-12 21:39:58 +0100
commit0db310586ac3e15be95d2ef27ff40cfa24c05c10 (patch)
treeabef833a897ede9e2ac6cfb82d0147b98d091436 /railties/test
parent49eefe123a1a032fb44bc5fef049d29c759fb157 (diff)
downloadrails-0db310586ac3e15be95d2ef27ff40cfa24c05c10.tar.gz
rails-0db310586ac3e15be95d2ef27ff40cfa24c05c10.tar.bz2
rails-0db310586ac3e15be95d2ef27ff40cfa24c05c10.zip
Prefer Minitest's location for test failures.
When running tests, the Rails test runner would report the start of the test method as the test failure. For this test: ```ruby 1 require 'test_helper 2 3 class BunnyTest < ActiveSupport::TestCase 4 test "something failing" do 5 assert false, 'This failed' 6 end 7 end ``` The runner outputs 5 instead of 4: ``` ............................................F This failed bin/rails test test/models/bunny_test.rb:5 ........ ```
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/test_runner_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb
index 0aa6ce2252..4965ab7da0 100644
--- a/railties/test/application/test_runner_test.rb
+++ b/railties/test/application/test_runner_test.rb
@@ -344,7 +344,7 @@ module ApplicationTests
create_test_file :models, 'post', pass: false
output = run_test_command('test/models/post_test.rb')
- assert_match %r{Running:\n\nPostTest\nF\n\nwups!\n\nbin/rails test test/models/post_test.rb:4}, output
+ assert_match %r{Running:\n\nPostTest\nF\n\nwups!\n\nbin/rails test test/models/post_test.rb:6}, output
end
def test_only_inline_failure_output