Class: RSpec::SleepingKingStudios::Deferred::Calls::Example
- Parent Namespace
- RSpec::SleepingKingStudios::Deferred::Calls
- Inherited Classes
- RSpec::SleepingKingStudios::Deferred::Call
>
Object
- Defined In
- lib/rspec/sleeping_king_studios/deferred/calls/example.rb
Table Of Contents
Overview
Value object representing a deferred RSpec example.
Back To Top
Constructor
#initialize(method_name, *arguments, deferred_example_group: nil, **keywords, &block) => Example
Parameters
- method_name (String, Symbol) — the name of the method to call.
- arguments (Array) — the arguments to pass to the method.
- keywords (Hash) — the keywords to pass to the method.
- deferred_example_group (Deferred::Examples) — the deferred example
group defining the deferred call.
- block (Proc) — the block to pass to the method.
Returns
- (Example) — a new instance of Example
Back To Top
Instance Attributes
#arguments => Array (readonly)
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Call
Returns
- (Array) — the arguments to pass to the method.
#block => Proc (readonly)
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Call
Returns
- (Proc) — the block to pass to the method.
#deferred_example_group => Deferred::Examples (readonly)
Returns
- (Deferred::Examples) — the deferred example group defining the
deferred call.
#keywords => Hash (readonly)
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Call
Returns
- (Hash) — the keywords to pass to the method.
#method_name => String, Symbol (readonly)
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Call
Returns
- (String, Symbol) — the name of the method to call.
Back To Top
Instance Methods
#==(other) => Boolean
- Inherited From
- RSpec::SleepingKingStudios::Deferred::Call
Compares the other object with the deferred call.
Returns true if and only if:
- The other object is an instance of Deferred::Call.
- The other object’s method name and type match the deferred call.
- The other object’s arguments, keywords, and block all match the deferred
call.
Parameters
- other (Object) — the object to compare.
Returns
- (Boolean) — true if the other matches the deferred call; otherwise
false.
#call(receiver) => Object
Invokes the deferred method call on the receiver.
Parameters
- receiver (Object) — the receiver for the method call.
Returns
- (Object) — the returned value of the method call.
Back To Top
Back to
Documentation |
Versions |
2.8.1 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Deferred
|
RSpec::SleepingKingStudios::Deferred::Calls