Class RSpec::Mocks::AnyInstance::Recorder
In: lib/rspec/mocks/any_instance/recorder.rb
Parent: Object

Given a class `TheClass`, `TheClass.any_instance` returns a `Recorder`, which records stubs and message expectations for later playback on instances of `TheClass`.

Further constraints are stored in instances of [Chain](Chain).

@see AnyInstance @see Chain

Methods

Attributes

message_chains  [R]  @private

Public Class methods

Public Instance methods

Initializes the recording a message expectation to be played back against any instance of this object that invokes the submitted method.

@see Methods#should_receive

Initializes the recording a stub to be played back against any instance of this object that invokes the submitted method.

@see Methods#stub

@private

Initializes the recording a stub chain to be played back against any instance of this object that invokes the method matching the first argument.

@see Methods#stub_chain

Removes any previously recorded stubs, stub_chains or message expectations that use `method_name`.

@see Methods#unstub

@api private

Used internally to verify that message expectations have been fulfilled.

[Validate]