123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Core::AnonymousExampleGroup Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RSpec::Core::ExampleGroup
Defined in: rspec-core/lib/rspec/core/example_group.rb

Overview

Unnamed example group used by SuiteHookContext.

Constant Summary

Pending - Included

NOT_YET_IMPLEMENTED, NO_REASON_GIVEN

ExampleGroup - Inherited

INSTANCE_VARIABLE_TO_IGNORE, WrongScopeError

Class Attribute Summary

ExampleGroup - Inherited

.currently_executing_a_context_hook?

Returns true if a ‘before(:context)` or after(:context) hook is currently executing.

.top_level?

Class Method Summary

ExampleGroup - Inherited

.add_example

Adds an example to the example group.

.before_context_ivars, .children, .declaration_locations, .define_example_group_method,
.define_example_method

@example.

.define_nested_shared_group_method, .delegate_to_metadata, .descendant_filtered_examples, .descendants, .description, .each_instance_variable_for_example, .ensure_example_groups_are_configured,
.example

Defines an example within a group.

.examples,
.fexample

Shortcut to define an example with ‘:focus => true`.

.filtered_examples, .find_and_eval_shared,
.fit

Shortcut to define an example with ‘:focus => true`.

.focus

Shortcut to define an example with ‘:focus => true`.

.for_filtered_examples,
.fspecify

Shortcut to define an example with ‘:focus => true`.

.id,
.idempotently_define_singleton_method

Define a singleton method for the singleton class (remove the method if it’s already been defined).

.include_context

Includes shared content mapped to name directly in the group in which it is declared, as opposed to it_behaves_like, which creates a nested group.

.include_examples

Includes shared content mapped to name directly in the group in which it is declared, as opposed to it_behaves_like, which creates a nested group.

.initialize, .inspect,
.it

Defines an example within a group.

.metadata

The [Metadata](Metadata) object associated with this group.

.next_runnable_index_for, .ordering_strategy, .parent_groups,
.pending

Shortcut to define an example with ‘:pending => true`.

.remove_example

Removes an example from the example group.

.reset_memoized

Clear memoized values when adding/removing examples.

.run

Runs all the examples in this group.

.run_after_context_hooks, .run_before_context_hooks, .run_examples, .set_it_up, .set_ivars,
.singleton_class

:nocov:

.skip

Shortcut to define an example with ‘:skip => true`.

.specify

Defines an example within a group.

.store_before_context_ivars, .subclass,
.superclass_before_context_ivars

:nocov:

.superclass_metadata, .top_level_description,
.traverse_tree_until

Traverses the tree of groups, starting with self, then the children, recursively.

.update_inherited_metadata,
.with_replaced_metadata

Temporarily replace the provided metadata.

.xexample

Shortcut to define an example with ‘:skip => ’Temporarily skipped with xexample’‘.

.xit

Shortcut to define an example with ‘:skip => ’Temporarily skipped with xit’‘.

.xspecify

Shortcut to define an example with ‘:skip => ’Temporarily skipped with xspecify’‘.

.method_missing

See additional method definition at line 742.

SharedExampleGroup - Extended

MemoizedHelpers::ClassMethods - Extended

let

Generates a method whose return value is memoized after the first call.

let!

Just like let, except the block is invoked by an implicit before hook.

subject

Declares a subject for an example group which can then be wrapped with expect using is_expected to make it the target of an expectation in a concise, one-line example.

subject!

Just like subject, except the block is invoked by an implicit before hook.

Hooks - Extended

after

Declare a block of code to be run after each example (using :example) or once after all examples n the context (using :context).

append_after

Adds block to the back of the list of after blocks in the same scope (‘:example`, :context, or :suite).

append_before

Alias for Hooks#before.

around

Declare a block of code, parts of which will be run before and parts after the example.

before

Declare a block of code to be run before each example (using :example) or once before any example (using :context).

hooks

Holds the various registered hooks.

prepend_after

Alias for Hooks#after.

prepend_before

Adds block to the front of the list of before blocks in the same scope (‘:example`, :context, or :suite).

Instance Attribute Summary

MemoizedHelpers - Included

#__memoized

should just be placed in private section, but Ruby issues warnings on private attributes.

Instance Method Summary

ExampleGroup - Inherited

#described_class

Returns the class or module passed to the describe method (or alias).

Pending - Included

#pending

Marks an example as pending.

#skip

Marks an example as pending and skips execution.

MemoizedHelpers - Included

#is_expected

Wraps the subject in expect to make it the target of an expectation.

#should

When should is called with no explicit receiver, the call is delegated to the object returned by subject.

#should_not

Just like should, should_not delegates to the subject (implicit or explicit) of the example group.

#subject, #__init_memoized, #enforce_value_expectation, #initialize, #matcher_supports_value_expectations?

Class Method Details

.metadata

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/example_group.rb', line 776

def self.
  {}
end