From e97d9dace3bd8ffb721261f8af609142ab1a9e94 Mon Sep 17 00:00:00 2001 From: Sven Heyll Date: Sun, 16 Dec 2012 20:32:03 +0100 Subject: [PATCH] Correct some documentation --- src/em.erl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/em.erl b/src/em.erl index 4ee5b7f..85875b3 100644 --- a/src/em.erl +++ b/src/em.erl @@ -153,11 +153,14 @@ new() -> %%------------------------------------------------------------------------------ %% @doc +%% %% Add an expectation during the programming phase for a specific function %% invokation. +%% %%

All expectations defined by 'strict' define an order in which the %% application must call the mocked functions, hence the name 'strict' as oposed %% to 'stub' (see below).

+%% %%

The parameters are: %%

-%%

This function returns a term that identifies this expectations so that the -%% code under test can call {@link await/2} to block until this expectation is -%% fullfilled.

-%%

-%% The return value, that the application will get when calling the mocked +%% +%%

This function returns a reference that identifies the expectation. This +%% reference can be passed to {@link await/2} which blocks until the expectated +%% invokation happens.

+%% +%%

The return value, that the application will get when calling the mocked %% function in the replay phase is simply the atom ok. This %% differentiates this function from {@link strict/5}, which allows the %% definition of a custom response function or a custom return value.

+%% %% NOTE: This function may only be called between new/0 and {@link %% replay/1} - that is during the programming phase. +%% %% @end %%------------------------------------------------------------------------------ -spec strict(pid(), atom(), atom(), args()) ->