Module: RSpec::SleepingKingStudios::Examples::PropertyExamples
- Parent Namespace
- RSpec::SleepingKingStudios::Examples
- Extended Modules
- RSpec::SleepingKingStudios::Concerns::SharedExampleGroup
- Included Modules
- RSpec::SleepingKingStudios::Examples::PropertyExamples::ClassProperties, RSpec::SleepingKingStudios::Examples::PropertyExamples::Constants, RSpec::SleepingKingStudios::Examples::PropertyExamples::Predicates, RSpec::SleepingKingStudios::Examples::PropertyExamples::PrivateProperties, RSpec::SleepingKingStudios::Examples::PropertyExamples::Properties
- Defined In
- lib/rspec/sleeping_king_studios/examples/property_examples.rb
Table Of Contents
Overview
Pregenerated example groups for testing the presence and value of reader and
writer methods.
Back To Top
Defined Under Namespace
- Modules
- ClassProperties,
Constants,
Predicates,
PrivateProperties,
Properties
Back To Top
Constants
UNDEFINED_VALUE_EXPECTATION
= Object.new.freeze
Internal object used to differentiate a nil expectation from a default
value expectation.
Back To Top
Class Methods
.alias_shared_examples new_name, old_name => Object
Also known as:
alias_shared_context
- Inherited From
- RSpec::SleepingKingStudios::Concerns::SharedExampleGroup
Aliases a defined shared example group, allowing it to be accessed using
a new name. The example group must be defined in the current context
using shared_examples
. The aliases must be defined before including the
module into an example group, or they will not be available in the
example group.
Parameters
- new_name (String) — The new name to alias the shared example group
as.
- old_name (String) — The name under which the shared example group is
currently defined.
Raises
- () — ArgumentError If the referenced shared example group does not
exist.
.included other => Object
- Inherited From
- RSpec::SleepingKingStudios::Concerns::SharedExampleGroup
Hook to merge defined example groups when included in another module.
.shared_examples(name, &block) => Object
.shared_examples(name, metadata, &block) => Object
Also known as:
shared_context
- Inherited From
- RSpec::SleepingKingStudios::Concerns::SharedExampleGroup
Defines a shared example group within the context of the current module.
Unlike a top-level example group defined using RSpec#shared_examples,
these examples are not globally available, and must be mixed into an
example group by including the module. The shared examples must be
defined before including the module, or they will not be available in the
example group.
Overloads
.shared_examples(name, &block) => Object
Parameters
- name (String) — Identifer to use when looking up this shared group.
- block — Used to create the shared example group definition.
.shared_examples(name, metadata, &block) => Object
Parameters
- name (String) — Identifer to use when looking up this shared group.
- metadata (Array<Symbol>, Hash) — Metadata to attach to this group;
any example group with matching metadata will automatically include
this shared example group.
- block — Used to create the shared example group definition.
Back To Top
Back to
Documentation |
Versions |
2.8 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Examples