From da832016bf775a5b1daeec40d642bf6424a3018a Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Wed, 7 Oct 2015 22:23:26 +0200 Subject: Hide Minitest's aggregated results if outputting inline. We'd see the failures and errors reported after the run, which is needless, when we've already reported them. Turns: ``` .......................................S....................F This failed bin/rails test test/models/bunny_test.rb:14 .... Finished in 0.100886s, 1020.9583 runs/s, 1001.1338 assertions/s. 2) Failure: BunnyTest#test_something_failing [/Users/kasperhansen/Documents/code/collection_caching_test/test/models/bunny_test.rb:15]: This failed 103 runs, 101 assertions, 1 failures, 0 errors, 1 skips You have skipped tests. Run with --verbose for details. ``` Into: ``` ...................S.......................................F This failed bin/rails test test/models/bunny_test.rb:14 ...................... Finished in 0.069910s, 1473.3225 runs/s, 1444.7143 assertions/s. 103 runs, 101 assertions, 1 failures, 0 errors, 1 skips ``` --- railties/test/application/test_runner_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'railties/test/application') diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index acfba21f1c..3eb2c2fd84 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -355,6 +355,21 @@ module ApplicationTests assert_match %r{Running:\n\nF\n\nwups!\n\nbin/rails test test/models/post_test.rb:4}, output end + def test_no_failure_output_after_run_if_outputting_inline + app_file 'test/models/post_test.rb', <<-RUBY + require 'test_helper' + + class PostTest < ActiveSupport::TestCase + def test_post + assert false, 'wups!' + end + end + RUBY + + output = run_test_command('test/models/post_test.rb') + assert_match %r{Finished in.*\n\n1 runs, 1 assertions}, output + end + def test_fail_fast app_file 'test/models/post_test.rb', <<-RUBY require 'test_helper' -- cgit v1.2.3