class Spectator::DSL::ExampleFactory

Overview

Creates instances of examples from a specified class.

Defined in:

spectator/dsl/example_factory.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

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

Constructor Detail

def self.new(example_type : Example.class) #

Creates the factory. The type passed to this constructor must be a sub-type of Example.


[View source]

Instance Method Detail

def build(group : ExampleGroup, sample_values : Internals::SampleValues) : Example #

Constructs a new example instance and returns it. The group and sample_values are passed to Example#initialize.


[View source]