Spectator::ExampleHooks
Inherits Reference < Object
Collection of hooks that run at various times throughout testing.
A hook is just a Proc (code block) that runs at a specified time.
Constructors
Creates a new set of hooks.
Class methods
Creates an empty set of hooks. This will effectively run nothing extra while running a test.
Instance methods
Runs all "after-all" hooks. These hooks should be run once after all examples in group finish.
Runs all "after-all" hooks. These hooks should be run every time after each example in a group.
Runs all "before-all" hooks. These hooks should be run once before all examples in the group start.
Runs all "before-each" hooks. These hooks should be run every time before each example in a group.
Creates a proc that runs the "around-each" hooks
in addition to a block passed to this method.
To call the block and all "around-each" hooks,
just invoke Proc#call on the returned proc.