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
Most of time in my cases a mock behavior function returns a {ok, _} or {error, _} tuple as result.
But sel_gen_server:call will by default untuple the result to determine it is an exception or not, so to get around this I have to wrap the result with another {ok, _} layer. Like:
Should be fixed in 1.0.3. It will break your tests (sorry about that) but since it was actually a bug I thought that increasing the patch level would be more appropriate than bumping the major version.
Most of time in my cases a mock behavior function returns a
{ok, _}
or{error, _}
tuple as result.But sel_gen_server:call will by default untuple the result to determine it is an exception or not, so to get around this I have to wrap the result with another
{ok, _}
layer. Like:And here is my typical setup of moka: https://gist.github.com/stwind/6109054
I think here just using a built-in
gen_server:call
will be fineThe text was updated successfully, but these errors were encountered: