struct

Spectator::Formatting::Components::Totals

Inherits Struct / Value / Object

Displays counts for each type of example result (pass, fail, error, pending).

Constructors

new(examples : Int32, failures : Int32, errors : Int32, pending : Int32)

Creates the component with the specified counts.

Source
new(counts)

Creates the component by pulling numbers from counts.

Source

Class methods

colorize(counts)

Creates the component, but colors it whether there were pending or failed results. The component will be red if there were failures (or errors), yellow if there were pending/skipped tests, and green if everything passed.

Source

Instance methods

to_s(io : IO) : Nil

Writes the counts to the output.

Source