123456789_123456789_123456789_123456789_123456789_

Class: RSpec::Mocks::VerifyingPartialDoubleProxy Private

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RSpec::Mocks::PartialDoubleProxy
Defined in: rspec-mocks/lib/rspec/mocks/verifying_proxy.rb

Constant Summary

Proxy - Inherited

DEFAULT_MESSAGE_EXPECTATION_OPTS

Class Method Summary

Instance Attribute Summary

Proxy - Inherited

Instance Method Summary

Constructor Details

.new(object, expectation_ordering, optional_callback_invocation_strategy = DEFAULT_CALLBACK_INVOCATION_STRATEGY) ⇒ VerifyingPartialDoubleProxy

[ GitHub ]

  
# File 'rspec-mocks/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)

[ GitHub ]

  
# File 'rspec-mocks/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

[ GitHub ]

  
# File 'rspec-mocks/lib/rspec/mocks/verifying_proxy.rb', line 128

def method_reference
  @method_doubles
end