Spectator::ExampleGroup
Inherits Indexable / Enumerable / Iterable / Spectator::Hooks / Spectator::Node / Reference / Object
Collection of examples and sub-groups.
Constructors
Creates the example group.
The name describes the purpose of the group.
It can be a Symbol to describe a type.
The location tracks where the group exists in source code.
This group will be assigned to the parent group if it is provided.
A set of metadata can be used for filtering and modifying example behavior.
Instance methods
Adds the specified node to the group. Assigns the node to this group. If the node already belongs to a group, it will be removed from the previous group before adding it to this group.
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.
Removes the specified node from the group. The node will be unassigned from this group.
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.
Constructs the full name or description of the example group. This prepends names of groups this group is part of.