RSpec

Library providing tools for writing and running RSpec tests.

Module: RSpec::SleepingKingStudios::Examples::PropertyExamples::ClassProperties

Parent Namespace
RSpec::SleepingKingStudios::Examples::PropertyExamples
Extended Modules
RSpec::SleepingKingStudios::Concerns::SharedExampleGroup
Defined In
lib/rspec/sleeping_king_studios/examples/property_examples/class_properties.rb

Table Of Contents

Overview

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

Raises

.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 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Examples | RSpec::SleepingKingStudios::Examples::PropertyExamples