diff options
author | Yves Senn <yves.senn@gmail.com> | 2016-02-15 15:09:00 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2016-02-15 15:19:24 +0100 |
commit | 07e422f58d61da0da4fce3180c3b79982e208143 (patch) | |
tree | 9fed1c251e296eb029ab453a26d49d9fb7071efd /railties | |
parent | ea70c295ffc7b335ed6c587f4060746e8b59d833 (diff) | |
download | rails-07e422f58d61da0da4fce3180c3b79982e208143.tar.gz rails-07e422f58d61da0da4fce3180c3b79982e208143.tar.bz2 rails-07e422f58d61da0da4fce3180c3b79982e208143.zip |
test runner, relay minitest information about the error location.
This is a follow-up to ea70c29 to bring back the assertion error
location information provided by minitest.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/test_unit/reporter.rb | 2 | ||||
-rw-r--r-- | railties/test/application/test_runner_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb index 317726f672..ce99dbd585 100644 --- a/railties/lib/rails/test_unit/reporter.rb +++ b/railties/lib/rails/test_unit/reporter.rb @@ -68,7 +68,7 @@ module Rails def format_failures(result) result.failures.map do |failure| - "#{failure.result_label}:\n#{result.class}##{result.name}:\n#{failure.message}\n" + "#{failure.result_label}:\n#{result.location}:\n#{failure.message}\n" end end diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index 5a6119c483..b0f348f3f1 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -467,7 +467,7 @@ module ApplicationTests create_test_file :models, 'post', pass: false output = run_test_command('test/models/post_test.rb') - expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth:\nwups!\n\nbin/rails test test/models/post_test.rb:4\n\n\n\n} + expect = %r{Running:\n\nPostTest\nF\n\nFailure:\nPostTest#test_truth \[[^\]]+test/models/post_test.rb:6\]:\nwups!\n\nbin/rails test test/models/post_test.rb:4\n\n\n\n} assert_match expect, output end |