eproxus/meck — pull request #97 by horkhe (2013-02-08 10:47:00+00:00)
Title: Feature/capture

WARNING: It depends on a pull request #96. The first two commits in this pull request belong in fact to that one.

Introduces capability to capture an argument a mocked function was called with. It is particularly useful to obtain references to internal funs passed as callbacks to mocked functions.

```Erlang
meck:expect(test, foo, 3, ok),
test:foo(preved, fun() -> bar end, medved),
{ok, Capture} = meck:captrue(last, {test, foo, 3}, 2),
bar = Capture().
```