diff --git a/src/spectator/formatters/default_formatter.cr b/src/spectator/formatters/default_formatter.cr index 5de8d36..d4cb968 100644 --- a/src/spectator/formatters/default_formatter.cr +++ b/src/spectator/formatters/default_formatter.cr @@ -39,7 +39,14 @@ module Spectator failures = results.failed_examples errors = results.errored_examples pending = results.pending_examples - "#{examples} examples, #{failures} failures, #{errors} errors, #{pending} pending" + string = "#{examples} examples, #{failures} failures, #{errors} errors, #{pending} pending" + if failures > 0 || errors > 0 + string.colorize.red + elsif pending != examples + string.colorize.yellow + else + string.colorize.green + end end private def human_time(span : Time::Span)