     fail(messages.NotAnExistingMethod, method_name) if not is_mock_object(object) and not is_class(object) and not does_object_have_method(object, method_name)
     fail(messages.NotAnExistingMethod, method_name) if not is_mock_object(object) and is_class(object) and not does_prototype_have_method(object, method_name)
   
-  _create_expectation = (object, method_name) ->
-    new Expectation(object, method_name)
+  _create_expectation = (object, method_name, all_expectations) ->
+    new Expectation(object, method_name, all_expectations)
 
   _is_reserved_method_name = (expects_method_name, method_name) ->
     method_name == expects_method_name

    try
      _check_mock_usage(args)
      [ expects_method_name, mock_count, test_function ] = _parse_args(args)
      expects_method = new ExpectsMethod(expects_method_name)
      convenience_mocks = _build_convenience_mock_objects(mock_count)
      _run_test_function(test_function, convenience_mocks)
      AllExpectations.verify_all_expectations()
    finally
      expects_method.uninstall_expects_method() if expects_method?  # TODO: the 'if' guard smells.
      AllExpectations.uninstall_all_mocked_methods()
      AllExpectations.unregister_all_expectations()

  # private
  

  _check_constructor_usage = (expects_method_name) ->
    fail(messages.ExpectsMethodAlreadyExists, expects_method_name) if Object.prototype[ expects_method_name ]?
    
  _install_expects_method = (expects_method_name, all_expectations) ->
    Object.prototype[ expects_method_name ] = (method_name) ->
      _check_expects_usage(@, expects_method_name, method_name)
      _create_expectation(@, method_name, all_expectations)

  # TODO: refactor (hideous name confusion re: expects_method, _install_uninstall_..., etc.)
  _install_uninstall_expects_method = (expects_method, expects_method_name) ->
