Writing Elixir stubs for better testing
A handy technique to create and use stubs for your Elixir projects, leading to better tests, more maintainable code, and a lot of fun while using ETS, match specs, and macros. We used these techniques to take unit testing to the limit in our Elixir projects.
http://tech.adroll.com/blog/dev/2018/03/28/elixir-stubs-for-tests.html
Read next How to trace a GenServer’s Execution? Elixir/Erlang