class

Spectator::Formatting::JSONFormatter

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

Produces a JSON document with results of the test suite.

Constructors

new(io = STDOUT)

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

Source

Instance methods

close

Ends the JSON document and flushes output.

Source
dump_profile(notification)

Adds the profiling information to the document.

Source
dump_summary(notification)

Adds the summary object to the document.

Source
example_finished(notification)

Adds an object containing fields about the example.

Source
start(_notification)

Begins the JSON document output.

Source
stop

Marks the end of the examples array.

Source