           @object[@method_name] = @original_method
         else
           delete @object[@method_name]
+      mock_method.find_errors = ->
+        @expectations.find_errors(@method_name)
       @[method_name] = mock_method
       mock_methods.add(mock_method)
     expectations.create_expectation()

        if @_list[outer].equals( @_list[inner] )
          fail(messages.DuplicateExpectation, method_name, @_list[outer]._args)

  find_errors: (method_name) ->                           # method_name is for error messages; TODO: is there a better way?
    format(messages.ExpectationNeverCalled, method_name, expectation._args) for expectation in @_list when ! expectation._called


format = (message, args...) ->
  message.replace /{(\d)+}/g, (match, i) ->
    if typeof args[i] isnt 'undefined' then args[i] else match
    
#
# [ [], [ "a" ], [ "b", "c" ] ]   => [ "a", "b", "c" ]
# [ [], [], [] ]                  => []
#
# Don't care about this scenario:
# [ [ [ "a" ] ], [ "b"] ]         => [ [ "a" ], "b" ]
#
# See: http://stackoverflow.com/a/10865042
#
flatten = (array) ->
  [].concat.apply([], array)


#
