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()) ->