class RSpec::Mocks::PartialMockProxy
def add_simple_expectation(method_name, response, location)
- Private: -
def add_simple_expectation(method_name, response, location) method_double_for(method_name).configure_method super end
def add_simple_stub(method_name, response)
- Private: -
def add_simple_stub(method_name, response) method_double_for(method_name).configure_method super end
def any_instance_class_recorder_observing_method?(klass, method_name)
def any_instance_class_recorder_observing_method?(klass, method_name) return true if ::RSpec::Mocks.any_instance_recorder_for(klass).already_observing?(method_name) superklass = klass.superclass return false if superklass.nil? any_instance_class_recorder_observing_method?(superklass, method_name) end
def method_handle_for(message)
def method_handle_for(message) if any_instance_class_recorder_observing_method?(@object.class, message) message = ::RSpec::Mocks. any_instance_recorder_for(@object.class). build_alias_method_name(message) end ::RSpec::Mocks.method_handle_for(@object, message) rescue NameError nil end