Module: RSpec::Mocks::ObjectVerifyingDoubleMethods Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
VerifyingDouble ,
TestDouble
|
|
Defined in: | rspec-mocks/lib/rspec/mocks/verifying_double.rb |
Overview
An awkward module necessary because we cannot otherwise have ClassVerifyingDouble
inherit from Module and still share these methods.
Instance Attribute Summary
TestDouble
- Included
#null_object? | Returns true if this object has received ‘as_null_object`. |
Instance Method Summary
- #as_stubbed_const(options = {}) Internal use only
- #__build_mock_proxy(order_group) private Internal use only
VerifyingDouble
- Included
TestDouble
- Included
#== | This allows for comparing the mock to other objects that proxy such as ActiveRecords belongs_to proxy objects. |
#__build_mock_proxy_unless_expired, #__disallow_further_usage!, | |
#as_null_object | Tells the object to respond to all messages. |
#freeze | Override for default freeze implementation to prevent freezing of test doubles. |
#initialize | Creates a new test double with a |
#inspect, #respond_to?, #to_s, #__build_mock_proxy, #__mock_proxy, #__raise_expired_error, #assign_stubs, #initialize_copy, #method_missing |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RSpec::Mocks::VerifyingDouble
Instance Method Details
#__build_mock_proxy(order_group) (private)
[ GitHub ]# File 'rspec-mocks/lib/rspec/mocks/verifying_double.rb', line 98
def __build_mock_proxy(order_group) VerifyingProxy.new(self, order_group, @doubled_module, ObjectMethodReference ) end
#as_stubbed_const(options = {})
[ GitHub ]# File 'rspec-mocks/lib/rspec/mocks/verifying_double.rb', line 91
def as_stubbed_const(={}) ConstantMutator.stub(@doubled_module.const_to_replace, self, ) self end