We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A mocked module will not throw the cause that failed to match.
make shell
ok = meck:new(mymod, [non_strict]). ok = meck:expect(mymod, test, [1], 2). catch(mymod:test(2)). {'EXIT', {function_clause, [{io_lib_pretty,cind_tag_tuple,7, [{file,"io_lib_pretty.erl"},{line,637}]}, {io_lib_pretty,cind_element,7, [{file,"io_lib_pretty.erl"},{line,726}]}, {io_lib_pretty,cind_list,7, [{file,"io_lib_pretty.erl"},{line,696}]}, {io_lib_pretty,cind_element,7, [{file,"io_lib_pretty.erl"},{line,726}]}, {io_lib_pretty,cind_list,7, [{file,"io_lib_pretty.erl"},{line,696}]}, {io_lib_pretty,cind_element,7, [{file,"io_lib_pretty.erl"},{line,726}]}, {io_lib_pretty,cind_list,7, [{file,"io_lib_pretty.erl"},{line,696}]}, {io_lib_pretty,while_fail,3, [{file,"io_lib_pretty.erl"},{line,737}]}]}}
I was expecting to get the function and arguments that didn't match. If the expectation is using an anonymous function, this error shows up:
11> catch(mymod:test(2)). {'EXIT', {function_clause, [{erl_eval,'-inside-an-interpreted-fun-',[2],[]}, {erl_eval,expr,3,[]}]}}
So at least the arguments are shown [2]
[2]
It shows an empty function clause error giving no visibility of what failed to match.
Meck version: master Erlang version: OTP 18
The text was updated successfully, but these errors were encountered:
e182a99
Turns out the fix was relatively simple 😄 Sorry for the long delay!
Sorry, something went wrong.
No branches or pull requests
A mocked module will not throw the cause that failed to match.
Reproduction Steps
make shell
Expected behavior
I was expecting to get the function and arguments that didn't match. If the expectation is using an anonymous function, this error shows up:
So at least the arguments are shown
[2]
Observed behavior
It shows an empty function clause error giving no visibility of what failed to match.
Versions
Meck version: master
Erlang version: OTP 18
The text was updated successfully, but these errors were encountered: