You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I can see, exception raised because case clause expected what Args in {passthrough, Args} are the same arguments which were been passed to the mocked function:
handle_mock_exception(Mod, Func, Fun, Args) ->
case Fun() of
...
{passthrough, Args} ->
% call_original(Args) called from mock function
Result = apply(original_name(Mod), Func, Args),
cast(Mod, {add_history, {{Mod, Func, Args}, Result}}),
Result
end.
I'm not sure if it is right or wrong behaviour. I suggest replacing Args in that clause to PassthroughArgs or something like this.
I tried to do that:
I've expected "foo" as a result but I've got an exception:
{{case_clause, {passthrough, [" foo "]}}, [{meck, handle_mock_exception, 4}, ... ]}
The text was updated successfully, but these errors were encountered: