Class: RSpec::Mocks::VerifyingPartialDoubleProxy
- Inherits:
-
PartialDoubleProxy
- Object
- Proxy
- PartialDoubleProxy
- RSpec::Mocks::VerifyingPartialDoubleProxy
- Includes:
- VerifyingProxyMethods
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Proxy
Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
- #ensure_implemented(_method_name) ⇒ Object
-
#initialize(object, expectation_ordering, optional_callback_invocation_strategy = DEFAULT_CALLBACK_INVOCATION_STRATEGY) ⇒ VerifyingPartialDoubleProxy
constructor
A new instance of VerifyingPartialDoubleProxy.
- #method_reference ⇒ Object
Methods included from VerifyingProxyMethods
#add_message_expectation, #add_simple_stub, #add_stub, #ensure_publicly_implemented
Methods inherited from PartialDoubleProxy
#add_simple_expectation, #add_simple_stub, #message_received, #original_method_handle_for, #reset, #visibility_for
Methods inherited from Proxy
#add_message_expectation, #add_simple_expectation, #add_simple_stub, #add_stub, #as_null_object, #build_expectation, #check_for_unexpected_arguments, #ensure_can_be_proxied!, #has_negative_expectation?, #message_received, #messages_arg_list, #method_double_if_exists_for_message, #null_object?, #original_method_handle_for, prepended_modules_of, #prepended_modules_of_singleton_class, #raise_missing_default_stub_error, #raise_unexpected_message_error, #received_message?, #record_message_received, #remove_stub, #remove_stub_if_present, #replay_received_message_on, #reset, #verify, #visibility_for
Constructor Details
#initialize(object, expectation_ordering, optional_callback_invocation_strategy = DEFAULT_CALLBACK_INVOCATION_STRATEGY) ⇒ VerifyingPartialDoubleProxy
Returns a new instance of VerifyingPartialDoubleProxy.
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 110 def initialize(object, expectation_ordering, optional_callback_invocation_strategy=DEFAULT_CALLBACK_INVOCATION_STRATEGY) super(object, expectation_ordering) @doubled_module = DirectObjectReference.new(object) # A custom method double is required to pass through a way to lookup # methods to determine their parameters. @method_doubles = Hash.new do |h, k| h[k] = VerifyingExistingMethodDouble.for(object, k, self) end optional_callback_invocation_strategy.call(@doubled_module) end |
Instance Method Details
#ensure_implemented(_method_name) ⇒ Object
123 124 125 126 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 123 def ensure_implemented(_method_name) return if Mocks.configuration.temporarily_suppress_partial_double_verification super end |
#method_reference ⇒ Object
128 129 130 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-mocks-3.12.2/lib/rspec/mocks/verifying_proxy.rb', line 128 def method_reference @method_doubles end |