Class: RSpec::Mocks::VerifyingMethodDouble

Inherits:
MethodDouble show all
Defined in:
lib/rspec/mocks/verifying_proxy.rb

Direct Known Subclasses

VerifyingExistingMethodDouble

Constant Summary

Instance Attribute Summary

Attributes inherited from MethodDouble

#expectations, #method_name, #object, #stubs

Instance Method Summary (collapse)

Methods inherited from MethodDouble

#add_default_stub, #add_simple_expectation, #add_simple_stub, #add_stub, #build_expectation, #clear, #configure_method, #define_proxy_method, #object_singleton_class, #original_method, #raise_method_not_stubbed_error, #remove_stub, #remove_stub_if_present, #reset, #restore_original_method, #restore_original_visibility, #setup_simple_method_double, #show_frozen_warning, #verify, #visibility

Constructor Details

- (VerifyingMethodDouble) initialize(object, method_name, proxy, method_reference)



112
113
114
115
# File 'lib/rspec/mocks/verifying_proxy.rb', line 112

def initialize(object, method_name, proxy, method_reference)
  super(object, method_name, proxy)
  @method_reference = method_reference
end

Instance Method Details

- (Object) add_expectation(*args, &block)



121
122
123
124
# File 'lib/rspec/mocks/verifying_proxy.rb', line 121

def add_expectation(*args, &block)
  # explict params necessary for 1.8.7 see #626
  super(*args, &block).tap { |x| x.method_reference = @method_reference }
end

- (Object) message_expectation_class



117
118
119
# File 'lib/rspec/mocks/verifying_proxy.rb', line 117

def message_expectation_class
  VerifyingMessageExpectation
end

- (Object) proxy_method_invoked(obj, *args, &block)



126
127
128
129
# File 'lib/rspec/mocks/verifying_proxy.rb', line 126

def proxy_method_invoked(obj, *args, &block)
  validate_arguments!(args)
  super
end