class Spectator::IterativeExampleGroupBuilder(T)


Progressively constructs an iterative example group. Hooks and builders for child nodes can be added over time to this builder. When done, call #build to produce an ExampleGroup with nested ExampleGroupIteration instances.

Defined in:



Instance Method Summary

Instance methods inherited from class Spectator::ExampleGroupBuilder

<<(builder) <<, after_all(hook : ExampleGroupHook) : Nil
after_all(*args, **kwargs) : Nil
after_all(*args, **kwargs, &block) : Nil
, after_each(hook : ExampleHook) : Nil
after_each(*args, **kwargs) : Nil
after_each(*args, **kwargs, &block) : Nil
, around_each(hook : ExampleProcsyHook) : Nil
around_each(*args, **kwargs) : Nil
around_each(*args, **kwargs, &block) : Nil
, before_all(hook : ExampleGroupHook) : Nil
before_all(*args, **kwargs) : Nil
before_all(*args, **kwargs, &block) : Nil
, before_each(hook : ExampleHook) : Nil
before_each(*args, **kwargs) : Nil
before_each(*args, **kwargs, &block) : Nil
, build(parent = nil) build, post_condition(hook : ExampleHook) : Nil
post_condition(*args, **kwargs) : Nil
post_condition(*args, **kwargs, &block) : Nil
, pre_condition(hook : ExampleHook) : Nil
pre_condition(*args, **kwargs) : Nil
pre_condition(*args, **kwargs, &block) : Nil

Constructor methods inherited from class Spectator::ExampleGroupBuilder

new(name : Label = nil, location : Location? = nil, metadata : Metadata = new

Instance methods inherited from class Spectator::NodeBuilder

build(parent = nil) build

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 : Enumerable(T), name : String? = nil, iterators : Array(String) = [] of String, location : Location? = nil, metadata : Metadata = #

Creates the builder. Initially, the builder will have no children and no hooks. The name, location, and metadata will be applied to the ExampleGroup produced by #build. The collection is the set of items to create sub-nodes for. The iterators is a list of optional names given to items in the collection.

[View source]

Instance Method Detail

def build(parent = nil) #

Constructs an iterative example group with previously defined attributes, children, and hooks. The parent is an already constructed example group to nest the new example group under. It can be nil if the new example group won't have a parent.

[View source]