 
 #
 # mock()
+#
+# mock (mocked_book) ->
+#   mocked_book.expects("read")
+#   ...
 #
 publish.mock = (test_function) ->
   try


  # private
  
  _throw_unknown_expectation = (expectation) ->
    throw new Error( "#{expectation} does not match any expectations" )


#

  @build_mocked_method: (method_name) ->
    (args...) ->
      expectation = AllExpectations.find_expectation(@, method_name, args...)
      _throw_unknown_expectation(method_name, args) unless expectation?
      AllExpectations.check_for_duplicate_expectations()
      expectation._called = yes
      throw expectation._throws if expectation._throws?
