     @args = []
     @returns = undefined
     @called = false
+    
+  matches: (method_name, args...) ->
+    (@method_name == method_name) and
+      ( @args.length == args.length ) and
+      ( @args.every ( element, i ) -> element == args[ i ] )
 
 
 

    @_throw_duplicate_expectation("#{method_name}(#{args})") if @_find_signature(method_name, args...)
        
  _check_for_uncalled_signatures: ->
    messages = ""
    for signature in @method_calls when signature.called == false
      messages += "'#{signature.method_name}(#{signature.args})' was never called\n" 

  # private
  
  _find_signature: (method_name, args...) ->
    # TODO: use list comprehension?
    for signature in @method_calls
      if signature.matches(method_name, args...)
        return signature
    undefined
  
