Class: RSpec::Mocks::VerifyingMessageExpectation Private
- Inherits:
-
MessageExpectation
- Object
- MessageExpectation
- RSpec::Mocks::VerifyingMessageExpectation
- Defined in:
- lib/rspec/mocks/verifying_message_expecation.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A message expectation that knows about the real implementation of the message being expected, so that it can verify that any expectations have the valid arguments.
Instance Attribute Summary (collapse)
-
- (Object) method_reference
private
A level of indirection is used here rather than just passing in the method itself, since method look up is expensive and we only want to do it if actually needed.
Instance Method Summary (collapse)
-
- (VerifyingMessageExpectation) initialize(*args)
constructor
private
A new instance of VerifyingMessageExpectation.
Constructor Details
- (VerifyingMessageExpectation) initialize(*args)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of VerifyingMessageExpectation
22 23 24 |
# File 'lib/rspec/mocks/verifying_message_expecation.rb', line 22 def initialize(*args) super end |
Instance Attribute Details
- (Object) method_reference
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A level of indirection is used here rather than just passing in the method itself, since method look up is expensive and we only want to do it if actually needed.
Conceptually the method reference makes more sense as a constructor argument since it should be immutable, but it is significantly more straight forward to build the object in pieces so for now it stays as an accessor.
20 21 22 |
# File 'lib/rspec/mocks/verifying_message_expecation.rb', line 20 def method_reference @method_reference end |