Module: RSpec::SleepingKingStudios::Deferred::Dsl
- Parent Namespace
- RSpec::SleepingKingStudios::Deferred
- Included Modules
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleConstants, RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups, RSpec::SleepingKingStudios::Deferred::Dsl::Examples, RSpec::SleepingKingStudios::Deferred::Dsl::Hooks, RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers, RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
- Defined In
- lib/rspec/sleeping_king_studios/deferred/dsl.rb
Table Of Contents
Overview
rubocop:disable Style/Documentation
Back To Top
Defined Under Namespace
- Modules
- ExampleConstants,
ExampleGroups,
Examples,
Hooks,
MemoizedHelpers,
SharedExamples
Back To Top
Class Methods
.extended(other) => Object
Callback invoked when the module is extended into another module or class.
Delegates to child module #extended methods.
Parameters
- other (Module) — the other module or class.
Back To Top
Instance Methods
#after(scope, *flags, **conditions, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
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
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
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
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
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
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
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
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Invokes the deferred examples on the given example group.
Parameters
- example_group (RSpec::Core::ExampleGroup) — the example group.
Returns
#context(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the context method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#describe(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the describe method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#example(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the example method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#example_class(class_name, base_class = nil, &) => Object
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleConstants
Defines a deferred temporary class scoped to the current example.
Parameters
- class_name (String) — the qualified name of the class.
- base_class (Class, String) — the base class or name of the base
class. This can be the name of another example class, as long as the
base class is defined earlier in the example group or in a parent
example group.
Yields
- definitions for the temporary class. This block is evaluated in
the context of the example, meaning that methods or memoized helpers
can be referenced.
Yield Parameters
- klass (Class) — the temporary class.
#example_constant(constant_name, constant_value) => Object (deprecated)
#example_constant(constant_name, &block) => Object (deprecated)
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleConstants
Deprecated. 2.8.0 with force: true parameter.
Overloads
#example_constant(constant_name, constant_value) => Object
Defines a deferred temporary constant scoped to the current example.
Parameters
- constant_name (String) — the qualified name of the constant.
- constant_value (Object) — the value of the constant.
#example_constant(constant_name, &block) => Object
Defines a deferred temporary constant scoped to the current example.
Parameters
- constant_name (String) — the qualified name of the constant.
Yields
- generates the constant value. This block is evaluated in the
context of the example, meaning that methods or memoized helpers can
be referenced.
Yield Returns
- the value of the constant.
#example_group(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the example_group method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#fcontext(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the fcontext method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#fdescribe(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the fdescribe method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#fexample(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the fexample method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#finclude_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the finclude_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#fit(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the fit method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#focus(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the focus method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#fspecify(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the fspecify method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#fwrap_context(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the fwrap_context method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#fwrap_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the fwrap_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#include_context(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the include_context method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#include_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the include_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#it(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the it method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#it_behaves_like(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the it_behaves_like method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#it_should_behave_like(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the it_should_behave_like method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#let(helper_name = nil, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Defines a memoized helper.
Parameters
- helper_name (String, Symbol) — the name of the helper method.
- block (Block) — the implementation of the helper method.
Returns
#let!(helper_name = nil, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Defines a memoized helper and adds a hook to evaluate it before examples.
Parameters
- helper_name (String, Symbol) — the name of the helper method.
- block (Block) — the implementation of the helper method.
Returns
#let?(helper_name, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Defines an optional memoized helper.
The helper will use the parent value if defined; otherwise, will use the
given value.
Parameters
- helper_name (String, Symbol) — the name of the helper method.
- block (Block) — the implementation of the helper method.
Returns
#pending(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the pending method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#prepend_before(scope, *flags, **conditions, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Hooks
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
#shared_context(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred shared example group using the shared_context method.
Parameters
- name (String, Symbol, Module) — the name for the shared example
group.
- flags (Array<Symbol>) — metadata flags for the shared example
group.
- metadata (Hash) — metadata for the shared example group.
- block (Proc) — the implementation of the shared example group.
Returns
#shared_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred shared example group using the shared_examples method.
Parameters
- name (String, Symbol, Module) — the name for the shared example
group.
- flags (Array<Symbol>) — metadata flags for the shared example
group.
- metadata (Hash) — metadata for the shared example group.
- block (Proc) — the implementation of the shared example group.
Returns
#shared_examples_for(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred shared example group using the shared_examples_for method.
Parameters
- name (String, Symbol, Module) — the name for the shared example
group.
- flags (Array<Symbol>) — metadata flags for the shared example
group.
- metadata (Hash) — metadata for the shared example group.
- block (Proc) — the implementation of the shared example group.
Returns
#skip(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the skip method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#specify(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the specify method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#subject(helper_name = nil, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Defines a memoized subject helper.
Parameters
- helper_name (String, Symbol) — the name of the helper method.
- block (Block) — the implementation of the helper method.
Returns
#subject!(helper_name = nil, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::MemoizedHelpers
Defines a memoized subject helper and adds a hook to evaluate it.
Parameters
- helper_name (String, Symbol) — the name of the helper method.
- block (Block) — the implementation of the helper method.
Returns
#wrap_context(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the wrap_context method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#wrap_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the wrap_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#xcontext(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the xcontext method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#xdescribe(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::ExampleGroups
Defines a deferred example group using the xdescribe method.
Parameters
- doc_string (String) — the example group's doc string.
- flags (Array<Symbol>) — metadata flags for the example group.
Will be transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example group.
- block (Proc) — the implementation of the example group.
Returns
#xexample(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the xexample method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#xinclude_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the xinclude_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#xit(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the xit method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#xspecify(doc_string = nil, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::Examples
Defines a deferred example using the xspecify method.
Parameters
- doc_string (String) — the example's doc string.
- flags (Array<Symbol>) — metadata flags for the example. Will be
transformed into metadata entries with true values.
- metadata (Hash) — metadata for the example.
- block (Proc) — the implementation of the example.
Returns
#xwrap_context(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the xwrap_context method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
#xwrap_examples(name, *flags, **metadata, &block) => void
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Dsl::SharedExamples
Defines a deferred included example group using the xwrap_examples method.
Parameters
- name (String, Symbol, Module) — the name for the included example
group.
- flags (Array<Symbol>) — metadata flags for the included example
group.
- metadata (Hash) — metadata for the included example group.
- block (Proc) — the implementation of the included example group.
Returns
Back To Top
Back to
Documentation |
Versions |
2.8 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Deferred