Module: RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
- Parent Namespace
- RSpec::SleepingKingStudios::Deferred::Dsl
- Defined In
- lib/rspec/sleeping_king_studios/deferred/dsl/hooks.rb
Table Of Contents
Overview
Domain-specific language for defining deferred hooks.
Back To Top
Instance Methods
#after(scope, *flags, **conditions, &block) => void
Defines a deferred hook using the #after method.
Parameters
- scope (Symbol) — the scope for the hook. Must be one of :context,
:each, or :example.
- flags (Array<Symbol>) — condition flags for the hook. Will be
transformed into conditions entries with true values.
- block (Proc) — the implementation of the hook.
Returns
#append_after(scope, *flags, **conditions, &block) => void
Defines a deferred hook using the #append_after method.
Parameters
- scope (Symbol) — the scope for the hook. Must be one of :context,
:each, or :example.
- flags (Array<Symbol>) — condition flags for the hook. Will be
transformed into conditions entries with true values.
- block (Proc) — the implementation of the hook.
Returns
#around(scope, *flags, **conditions, &block) => void
Defines a deferred hook using the #around method.
Parameters
- scope (Symbol) — the scope for the hook. Must be one of :context,
:each, or :example.
- flags (Array<Symbol>) — condition flags for the hook. Will be
transformed into conditions entries with true values.
- block (Proc) — the implementation of the hook.
Returns
#before(scope, *flags, **conditions, &block) => void
Defines a deferred hook using the #before method.
Parameters
- scope (Symbol) — the scope for the hook. Must be one of :context,
:each, or :example.
- flags (Array<Symbol>) — condition flags for the hook. Will be
transformed into conditions entries with true values.
- block (Proc) — the implementation of the hook.
Returns
#call(example_group) => void
Invokes the deferred examples on the given example group.
Parameters
- example_group (RSpec::Core::ExampleGroup) — the example group.
Returns
#prepend_before(scope, *flags, **conditions, &block) => void
Defines a deferred hook using the #prepend_before method.
Parameters
- scope (Symbol) — the scope for the hook. Must be one of :context,
:each, or :example.
- flags (Array<Symbol>) — condition flags for the hook. Will be
transformed into conditions entries with true values.
- block (Proc) — the implementation of the hook.
Returns
Back To Top
Back to
Documentation |
Versions |
2.8.1 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Deferred
|
RSpec::SleepingKingStudios::Deferred::Dsl