Skip to content

Commit

Permalink
Indicate if there were errors in the summary
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Aug 10, 2024
1 parent 76b9485 commit c06506b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/spectator/formatters/common_text_output.cr
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ module Spectator::Formatters
def report_summary(summary : Summary) : Nil
status = case summary
when .passed? then "Passed"
when .errored? then "Failed (with errors)"
when .failed? then "Failed"
when .skipped? then "Passed (with skipped examples)"
else "Finished"
Expand Down
4 changes: 4 additions & 0 deletions src/spectator/formatters/summary.cr
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module Spectator::Formatters
failed > 0
end

def errored? : Bool
errors > 0
end

def skipped? : Bool
skipped > 0
end
Expand Down

0 comments on commit c06506b

Please sign in to comment.