class Spectator::DSL::ExampleFactory
- Spectator::DSL::ExampleFactory
- Reference
- Object
Overview
Creates instances of examples from a specified class.
Defined in:
spectator/dsl/example_factory.crConstructors
-
.new(example_type : Example.class)
Creates the factory.
Instance Method Summary
-
#build(group : ExampleGroup, sample_values : Internals::SampleValues) : Example
Constructs a new example instance and returns it.
Instance methods inherited from class Object
should(matcher : Spectator::Matchers::Matcher)
should,
should_not(matcher : Spectator::Matchers::Matcher)
should_not
Constructor Detail
Creates the factory.
The type passed to this constructor must be a sub-type of Example
.
Instance Method Detail
Constructs a new example instance and returns it.
The group and sample_values are passed to Example#initialize
.