     errors = @_mock_methods.find_errors()
     fail( errors.join("\n") + "\n" ) if errors.length > 0
 
-  cleanup: ->
+  cleanup_environment: ->
     @_mock_methods.restore_original_methods()
     @uninstall_expects_method()
 

  @mock: (args...) ->
    mock = new MockFunction()
    mock.load_args(args)
    mock.setup()
    try
      mock.run_test_function()
      mock.verify_expectations()
    finally
      mock.cleanup()

  constructor: ->
    @_test_function = undefined

    @parse_args(args)
    @check_expects_method_name()

  setup_environment: (args) ->
    @create_mock_objects()
    @create_empty_mock_methods_list()
    @install_expects_method()
