Using Mocks Safely in Elixir Tests
Sooner or later, as your Elixir codebase grows, you’re going to hit a point in your tests where you need to avoid running a particular function.
https://medium.com/stuart-engineering/using-mocks-safely-in-elixir-tests-d88f36a04882
Read next A Simple Notification System using Phoenix PubSub and pg_notify