struct Spectator::Runner


Logic for executing examples and collecting results.

Included Modules

Defined in:



Instance Method Summary

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)
, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__)

Constructor Detail

def : Array(Example), formatter : Formatting::Formatter, run_flags : Spectator::RunFlags = RunFlags::None, random_seed : UInt64 | Nil = nil) #

Creates the runner. The collection of examples should be pre-filtered and shuffled. This runner will run each example in the order provided. The formatter will be called for various events.

[View source]

Instance Method Detail

def run : Bool #

Runs the spec. This will run the provided examples and invoke the reporters to communicate results. True will be returned if the spec ran successfully, or false if there was at least one failure.

[View source]