class

Spectator::Formatting::JsonFormatter

Inherits Spectator::Formatting::Formatter < Reference < Object

Produces a JSON document containing the test results.

Constructors

new(io : IO = STDOUT)

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

Source

Instance methods

end_example(result : Result)

Called when a test finishes. The result of the test is provided.

Source
end_suite(report : Report, profile : Profile | Nil)

Called when a test suite finishes. The results from the entire suite are provided. The profile value is not nil when profiling results should be displayed.

Source
start_example(example : Example)

Called before a test starts.

Source
start_suite(suite : TestSuite)

Called when a test suite is starting to execute.

Source