mock
mock copied to clipboard
Feature Request: Capture arguments
Sometimes I need to capture a mocked function's arguments and then compare them to the nth time that that function was called. It was able to accomplish this by dropping down to :meck
but it would be nice if there were a helper macro / function
Workaround Example
# something called MyMockedModule.myfunc 2 times
# and I want to make sure that the params are the same both times
[{_, {_, :myfunc, args0}, _}, {_, {_, :myfunc, args1}, _}] =
unquote(MyMockedModule)
|> :meck.history()
assert Map.equal?(args0, args1)