class RSpec::Mocks::Mock

def method_missing(sym, *args, &block)

def method_missing(sym, *args, &block)
  __mock_proxy.record_message_received(sym, args, block)
  begin
    return self if __mock_proxy.null_object?
    super(sym, *args, &block)
  rescue NameError
    __mock_proxy.raise_unexpected_message_error sym, *args
  end
end