     @
 
 
-    
+
 #
 # Private Mock 'methods'; making them functions keeps the Mock object uncluttered.
 #
 
 _set_state = (mock, state) ->
   mock.state = state
-  
+
 _is_state_in = (mock, states...) ->
   mock.state in states
 

#
# MethodSignature is an internal data structure that represents 
# a mocked method.  Stores the method name, the expected arguments,
# the value to return or throw, and whether it has actually been 
# called.  For example, the following:
#
#   my_mock = (new Mock).expects("my_method").args(1,2,3).returns(42)
#
# would result in a MethodSignature with @method_name = "my_method",
# @args = [1,2,3], @returns = 42, @throws = undefined, and @called = 
# false.  Doing:
#
#   my_mock.my_method(1,2,3)
#
# would result in @called = true.  Note that a mocked function can 
# either return a value or throw an error but not both, so either
# @returns or @throws (or both) must be undefined.
#
class MethodSignature
  
  constructor: (method_name) ->
    @method_name = method_name
    @args = []

#   my_mock.returns(456).args(123).expects("my_method")
#
# is not.  @state is used to remember the last function called so that
# we can enforce this order.  Note that args, returns and throws are
# optional.  Also note that either returns or throws can be used, but
# not both on the same signature.
#
