 expects = (method_name) ->
   check_expects_usage(@, method_name)
   if typeof @ == 'function' and not @.prototype[ method_name ]?
-    throw new Error("'#{method_name}' is not an existing method; you can only mock existing methods on classes")
+    throw new Error( "'#{method_name}' is not an existing method; you can only mock existing methods on classes" )
   start_new_expectation(@, method_name)
 
 check_expects_usage = (object, method_name) ->

        throw_duplicate_expectation("#{all_expectations[outer].method_name}(#{all_expectations[outer]._args})")

throw_unknown_expectation = (expectation) ->
  throw "#{expectation} does not match any expectations"

throw_duplicate_expectation = (expectation) ->
  throw "#{expectation} is a duplicate expectation"


#

  new Expectation(object, method_name)

throw_expects_usage = ->
  throw new Error( "you need to supply a method name to expects(), e.g. my_mock.expects('my_method')" )

throw_reserved_word = (reserved_word) ->
  throw new Error( "you cannot use my_mock.expects('#{reserved_word}'); '#{reserved_word}' is a reserved method name" )
  
throw_pre_existing_property = (property_name) ->
  throw new Error( "'#{property_name}' is an existing property; you can only mock functions" )


#
