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


#
# Mock represents the mock of some object.  @signatures is a list of
# mocked methods, which are added with the .expects(), .args(), 
# .returns(), and .throws() functions.  These must be called in a 
# specific order, expects then args then returns or throws, so:
#
#   my_mock.expects("my_method").args(123).returns(456)

_check_returns_usage = (mock, value) ->
  _throw_returns_usage() unless value?
  _throw_returns_must_be_after_expects_or_args() unless _is_state_in(mock, "expects", "args")

_check_throws_usage = (mock, error) ->
  _throw_throws_usage(error) unless error?
  _throw_throws_must_be_after_expects_or_args() unless _is_state_in(mock, "expects", "args")

_check_for_duplicate_signatures = (mock) ->
  # TODO: use each with index and slice to avoid last element
  signatures = mock.signatures
