class Spectator::Formatting::DocumentFormatter

Overview

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.

Included Modules

Defined in:

spectator/formatting/document_formatter.cr

Constructors

Instance Method Summary

Instance methods inherited from module Spectator::Formatting::SuiteSummary

end_suite(report, profile : Profile | Nil) end_suite, start_suite(suite) start_suite

Instance methods inherited from class Spectator::Formatting::Formatter

end_example(result : Result) end_example, end_suite(report : Report, profile : Profile | Nil) end_suite, start_example(example : Example) start_example, start_suite(suite : TestSuite) start_suite

Instance methods inherited from class Object

should(matcher) should, should_eventually(matcher) should_eventually, should_never(matcher) should_never, should_not(matcher) should_not

Constructor Detail

def self.new(io : IO = STDOUT) #

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


[View source]

Instance Method Detail

def end_example(result) #

Produces a single character output based on a result.


[View source]
def start_example(example) #

Does nothing when an example is started.


[View source]