struct Spectator::Runner

Overview

Logic for executing examples and collecting results.

Included Modules

Defined in:

spectator/runner.cr

Constructors

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
, 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__)
should_not

Constructor Detail

def self.new(examples : 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]