def message_received(sym, *args, &block)
expectation = find_matching_expectation(sym, *args)
stub = find_matching_method_stub(sym, *args)
if ok_to_invoke_stub?(stub, expectation)
record_stub(stub, sym, args, &block)
elsif expectation
invoke_expectation(expectation, *args, &block)
elsif expectation = find_almost_matching_expectation(sym, *args)
record_almost_matching_expectation(expectation, sym, *args, &block)
elsif @target.is_a?(Class)
@target.superclass.send(sym, *args, &block)
else
@target.__send__ :method_missing, sym, *args, &block
end
end