# File lib/facon/proxy.rb, line 40 def message_received(method, *args, &block) if expectation = find_matching_expectation(method, *args) expectation.invoke(args, block) elsif stub = find_matching_method_stub(method, *args) stub.invoke([], block) elsif expectation = find_almost_matching_expectation(method, *args) raise_unexpected_message_args_error(expectation, *args) unless has_negative_expectation?(method) else @target.send(:method_missing, method, *args, &block) end end