Permalink
Browse files

Color final status according to severity

  • Loading branch information...
1 parent 86690b4 commit f29aac7a9d257ef79e28769ce96c5c95c4961d4f @cdlm cdlm committed Jan 16, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/minitest/display.rb
View
@@ -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]

0 comments on commit f29aac7

Please sign in to comment.