     @called = false
     
   #
-  # Returns true if this invocation has the specified method
+  # Returns true if this signature has the specified method
   # name and arguments.  For example:
   #
   #   ms = new MethodSignature("my_method")
   #   ms.args = [ 1, "a" ]
   #   ...
-  #   ms.matches( "my_method", [ 1, "a" ] )   # returns true
+  #   ms.matches( "my_method", [ 1, "a" ] )     # returns true
+  #   ms.matches( "your_method", [ 1, "a" ] )   # returns false
+  #   ms.matches( "my_method", [ 2, "b" ] )     # returns false
   #
   matches: (method_name, args...) ->
     ( @method_name == method_name ) and


#
# mock() is a shorthand function to ensure that .check() is called 
# on mock objects.  For example, using Mock directly:
#
#   describe "Something", ->
#     it "does something", ->
#       my_mock = new Mock()            # Create a mock object.
#       my_mock.expects("my_method")    # The mock should expect my_method to be invoked.
#       ...                             # Do something that is supposed to invoke my_method.
#       my_mock.check()                 # Need to remember to check that my_method was invoked.
#
#     it "does something else", ->
#       ...
#
# Using the mock() function:
#
#   describe "Something", ->
#     it "does something", ->
#       mock (my_mock) ->               # my_mock is created automatically.
#         my_mock.expects("my_method")  # The mock should expect my_method to be invoked.
#         ...                           # Do something that is supposed to invoke my_method.
#                                       # .check() is called automatically here by mock().
#
#     it "does something else", ->
#       ...
#
# The mock() function provides up to five mock objects:
#
#   mock (m1, m2, m3, m4, m5) ->
#     m1.expects("method1")
#     m2.expects("method2")
#     ...
#
mock = (fn) ->
  mocks = ( new Mock() for i in [1..5] )

    @
    
  #
  # my_mock = (new Mock).expects("my_method").expects("your_method")
  # my_mock.my_method()
  # my_mock.check()       # throws an error because your_method() was not called
  #
  check: ->
    @_check_for_uncalled_signatures()
