Spectator::ExampleGroupBuilder
Inherits Spectator::Hooks / Spectator::NodeBuilder / Reference / Object
Progressively constructs an example group.
Hooks and builders for child nodes can be added over time to this builder.
When done, call #build to produce an ExampleGroup.
Constructors
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.
Instance methods
Adds a child builder to the group.
The builder will have NodeBuilder#build called on it from within #build.
The new example group will be passed to it.
Registers a new "after_all" hook. The hook will be prepended to the list.
Registers a new "after_all" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleGroupHook.new.
Registers a new "after_all" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleGroupHook.new.
Registers a new "after_each" hook. The hook will be prepended to the list.
Registers a new "after_each" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "after_each" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "around_each" hook. The hook will be appended to the list.
Registers a new "around_each" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleProcsyHook.new.
Registers a new "around_each" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleProcsyHook.new.
Registers a new "before_all" hook. The hook will be appended to the list.
Registers a new "before_all" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleGroupHook.new.
Registers a new "before_all" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleGroupHook.new.
Registers a new "before_each" hook. The hook will be appended to the list.
Registers a new "before_each" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "before_each" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleHook.new.
Constructs an 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.
Registers a new "post_condition" hook. The hook will be prepended to the list.
Registers a new "post_condition" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "post_condition" hook.
The hook will be prepended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "pre_condition" hook. The hook will be appended to the list.
Registers a new "pre_condition" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleHook.new.
Registers a new "pre_condition" hook.
The hook will be appended to the list.
A new hook will be created by passing args to ExampleHook.new.