diff options
Diffstat (limited to 'railties/lib/rails/test_unit/reporter.rb')
-rw-r--r-- | railties/lib/rails/test_unit/reporter.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/railties/lib/rails/test_unit/reporter.rb b/railties/lib/rails/test_unit/reporter.rb index ce99dbd585..fe11664d5e 100644 --- a/railties/lib/rails/test_unit/reporter.rb +++ b/railties/lib/rails/test_unit/reporter.rb @@ -18,13 +18,13 @@ 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 end - if fail_fast? && result.failure && !result.error? && !result.skipped? + if fail_fast? && result.failure && !result.skipped? raise Interrupt end end @@ -50,7 +50,7 @@ module Rails end def relative_path_for(file) - file.sub(/^#{app_root}\/?/, '') + file.sub(/^#{app_root}\/?/, "") end private @@ -66,15 +66,9 @@ 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}" + "#{executable} #{relative_path_for(location)}:#{line}" end def app_root |