 
 _current_signature = (mock) ->
   mock.signatures[0]
-  
+
 _current_method_name = (mock) ->
   _current_signature(mock)?.method_name
 

  constructor: ->
    @signatures = []
    @state = undefined
  
  #
  # my_mock = (new Mock).expects("my_method")
  # my_mock.my_method()

#
# 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 = []
