Using Tesla.Mock.mock/1 properly

I am currently using Tesla as http client library. I wrote my tests successfully by using Tesla.Mock with this minimal configuration

config :tesla, adapter: Tesla.Mock

Now I noticed that every unit tests that I run which do not require mock are now looking for a mock with errors like this:

** (EXIT from #PID<0.2288.0>) an exception was raised:
         ** (Tesla.Mock.Error) There is no mock set for process #PID<0.1884.0>.
     Use Tesla.Mock.mock/1 to mock HTTP requests.

What am I missing?

1 Like