jjh42 / mock

Mocking library for Elixir language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should assertions print what WAS called?

jasongoodwin opened this issue · comments

From a usability perspective, I find myself modifying code to printing the expected invocation because what was invoked during the test is not printed to the console.
I feel like any unexpected invocation of the mock should print, or possibly just when verifying assertions.

I feel like there can be a lot of cases where a function is mocked to limit the scope of some unit test, without the need to know how the mocked function was called.

I understand your feature request, but it is a very specific use case which is not universally true, so I don't believe it is a feature that should be part of the library.

Let me know what you think

Okay, that makes sense to me.

I probably won't have time to tend to this sometime in the near future, but you're welcome to make a PR for this feature :)

+1 to @jasongoodwin's request. Not being able to see what was called is very annoying in many use cases, for example when chasing down failing tests as the result of a change in call structure.