How do I write Elixir tests?

It is one, it provides functionality of both Mox and Protomox, and a bunch of other features (like patching functions) too.

See Repatch.Mock — Repatch v1.6.1 and Repatch.Expectations — Repatch v1.6.1 for more info. These two modules basically recreate what Mox does, but with better performance, better isolation and no hacks like patching cover.erl in runtime in order to make coverage work

I am not a developer who thinks that I have to guide my library users somewhere, I just create a best tool there is and then users are free to use it for the best or for the worst. It’s called “freedom”, you should try it sometime.

For example, I haven’t seen a tool which can isolate application env in different tests, but Repatch can and it just works.


UPD, I will update the Repatch documentation with examples on how to use it in the style of Mox

2 Likes