Class: RSpec::Mocks::Matchers::HaveReceived
- Inherits:
-
Object
- Object
- RSpec::Mocks::Matchers::HaveReceived
- Defined in:
- lib/rspec/mocks/matchers/have_received.rb
Constant Summary
- COUNT_CONSTRAINTS =
%w(exactly at_least at_most times once twice)
- ARGS_CONSTRAINTS =
%w(with)
- CONSTRAINTS =
COUNT_CONSTRAINTS + ARGS_CONSTRAINTS
Instance Method Summary (collapse)
- - (Object) description
- - (Boolean) does_not_match?(subject)
- - (Object) failure_message
-
- (HaveReceived) initialize(method_name)
constructor
A new instance of HaveReceived.
- - (Boolean) matches?(subject)
- - (Object) negative_failure_message
Constructor Details
- (HaveReceived) initialize(method_name)
A new instance of HaveReceived
9 10 11 12 13 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 9 def initialize(method_name) @method_name = method_name @constraints = [] @subject = nil end |
Instance Method Details
- (Object) description
36 37 38 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 36 def description expect.description end |
- (Boolean) does_not_match?(subject)
21 22 23 24 25 26 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 21 def does_not_match?(subject) @subject = subject ensure_count_unconstrained @expectation = expect.never end |
- (Object) failure_message
28 29 30 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 28 def end |
- (Boolean) matches?(subject)
15 16 17 18 19 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 15 def matches?(subject) @subject = subject @expectation = expect end |
- (Object) negative_failure_message
32 33 34 |
# File 'lib/rspec/mocks/matchers/have_received.rb', line 32 def end |