Skip to content

Commit

Permalink
Color final status according to severity
Browse files Browse the repository at this point in the history
  • Loading branch information
cdlm committed Jan 16, 2012
1 parent 86690b4 commit f29aac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/minitest/display.rb
Expand Up @@ -214,7 +214,10 @@ def _run_suite(suite, type)

def status(io = self.output)
format = "%d tests, %d assertions, %d failures, %d errors, %d skips"
final_status = failures + errors > 0 ? :failure : :success
final_status = if errors > 0 then :error
elsif failures > 0 then :failure
else :success
end
io.puts display.color(format % [test_count, assertion_count, failures, errors, skips], final_status)

if display.options[:output_slow]
Expand Down

0 comments on commit f29aac7

Please sign in to comment.