Skip to content
New issue

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

More detailed error for "no such function to mock" #7

Open
MattVonVielen opened this issue Jun 11, 2013 · 0 comments
Open

More detailed error for "no such function to mock" #7

MattVonVielen opened this issue Jun 11, 2013 · 0 comments

Comments

@MattVonVielen
Copy link
Owner

In this situation, there is already a module (somewhere) named 'test'. The error we get is this:

foo_test: bar_test_case...*failed*                                                                                                                                                                             
in function hoax_expect:assert_exported/2 (src/hoax_expect.erl, line 12)
in call from hoax:mock/2 (src/hoax.erl, line 24)
in call from foo_test:bar_test_case/0 (test/foo_test.erl, line 135)
**error:{no_such_function_to_mock,{test_api,1}}

A better error might be:

**error:{no_such_function_to_mock,"test:test_api/1", "/source/path/from/metadata/for/test.erl_or_beam"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant