diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-02-20 21:22:48 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-02-21 15:51:35 +0900 |
commit | 64d5373981674575684af25c038900434ed2dbb6 (patch) | |
tree | 162ebedcc63a76a8aca6e7f42ceacedd9972ddf1 /railties/lib/rails/test_unit | |
parent | 3156a7692c3c51adb846252192364172b05bd67f (diff) | |
download | rails-64d5373981674575684af25c038900434ed2dbb6.tar.gz rails-64d5373981674575684af25c038900434ed2dbb6.tar.bz2 rails-64d5373981674575684af25c038900434ed2dbb6.zip |
use method provided by minitest
The process of converting `Test` to `String` is already defined in minitest.
I think it is better to use that for the consistency of output content.
ref: https://github.com/seattlerb/minitest/blob/master/lib/minitest/test.rb#L261..L267
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/reporter.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb index e81bd9df7e..4086d5b731 100644 --- a/railties/lib/rails/test_unit/reporter.rb +++ b/railties/lib/rails/test_unit/reporter.rb @@ -18,7 +18,7 @@ module Rails if output_inline? && result.failure && (!result.skipped? || options[:verbose]) io.puts io.puts - io.puts format_failures(result).map { |line| color_output(line, by: result) } + io.puts color_output(result, by: result) io.puts io.puts format_rerun_snippet(result) io.puts @@ -66,12 +66,6 @@ module Rails "%s#%s = %.2f s = %s" % [result.class, result.name, result.time, result.result_code] end - def format_failures(result) - result.failures.map do |failure| - "#{failure.result_label}:\n#{result.location}:\n#{failure.message}\n" - end - end - def format_rerun_snippet(result) location, line = result.method(result.name).source_location "#{self.executable} #{relative_path_for(location)}:#{line}" |