(Cont.) Make passthrough/1' and
func/1 into a
ret_spec`and func
#91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull addresses the code inspection comments for the original #90 (The original pull request was not extendable since I created it not from a branch but from a particular commit).
@eproxus as we agreed functions are used as expectation bodies. But I left function
meck:exec/1
(previously suggestedmeck:func/1
but renamed to better express the intention and align withmeck:raise/2
) so that if users would like to make their tests more expressive they can do that.That makes general idea of ret_specs as simple as that: ret_specs are created by generator functions
meck:val/1
,meck:raise/2
,meck:exec/1
,meck:passthrough/0
,meck:seq/1
,meck:loop/1
, but there are two shortcuts:meck:val/1
;meck:exec/1
.