Place error count in parens next to failures

This commit is contained in:
Michael Miller 2021-05-16 19:42:15 -06:00
parent aee171656a
commit 1e3e0daa04
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -1,3 +1,5 @@
require "colorize"
module Spectator::Formatting::Components
struct Totals
def initialize(@examples : Int32, @failures : Int32, @errors : Int32, @pending : Int32)
@ -25,9 +27,14 @@ module Spectator::Formatting::Components
io << @examples
io << " examples, "
io << @failures
io << " failures, "
io << @errors
io << " errors, "
io << " failures "
if @errors > 1
io << '('
io << @errors
io << " errors), "
end
io << @pending
io << " pending"
end