class

Spectator::Formatting::DocumentFormatter

Inherits Spectator::Formatting::Summary / Spectator::Formatting::Formatter / Reference / Object

Produces an indented document-style output. Each nested group of examples increases the indent. Example names are output in a color based on their result.

Constructors

new(io : IO = STDOUT)

Creates the formatter. By default, output is sent to STDOUT.

Source

Instance methods

example_error(notification)

Invoked after an example fails from an unexpected error. Produces a failure example line.

Source
example_failed(notification)

Invoked after an example fails. Produces a failure example line.

Source
example_passed(notification)

Invoked after an example completes successfully. Produces a successful example line.

Source
example_pending(notification)

Invoked after an example is skipped or marked as pending. Produces a pending example line.

Source
example_started(notification)

Invoked just before an example runs. Prints the example group hierarchy if it changed.

Source