The situation was that, I needed to mock multiple external service within my application in order to test my application.
These external services are being consumed using HTTPPoison the popular elixir http client. The mock is achieved using the Mock library
# ~/multi_mocks.exs Import Mock #Mock multiple functions of the same module test "Test special service that will call other supporting endpoints" do with_mock( HTTPoison, post!: fn endpoint_a, _, _ -> %HTTPoison. Read More...