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, message = nil) should, should_eventually(matcher, message = nil) should_eventually, should_never(matcher, message = nil) should_never, should_not(matcher, message = nil) should_not

Constructor Detail

def self.new(examples : Array(Example), formatter : Formatting::Formatter, run_flags = RunFlags::None, random_seed : UInt64? = 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]