abstract class Spectator::RunnableExample

Overview

Common base for all examples that can be run. This class includes all the logic for running example hooks, the example code, and capturing a result. Sub-classes need to implement the #what and #run_instance methods.

Defined in:

spectator/runnable_example.cr

Instance Method Summary

Instance methods inherited from class Spectator::Example

[](index : Int) : Example [], example_count : Int example_count, finished? : Bool finished?, group : ExampleGroup group, instance instance, run : Result run, source : Source source, to_json(json : JSON::Builder) to_json, to_s(io) to_s

Constructor methods inherited from class Spectator::Example

new(group : Spectator::ExampleGroup, sample_values : Internals::SampleValues) new

Instance methods inherited from class Spectator::ExampleComponent

[](index : Int) : Example [], example_count : Int example_count, finished? : Bool finished?, symbolic? : Bool symbolic?, what : Symbol | String what

Instance methods inherited from class Object

should(matcher : Spectator::Matchers::Matcher) should, should_not(matcher : Spectator::Matchers::Matcher) should_not

Instance Method Detail

def run_impl : Result #

Runs the example, hooks, and captures the result and translates to a usable result.


[View source]