News for hackers. Stuff that matters.
Re:Ask HN: Who regrets choosing Elixir? by mapcars on Sunday May 24, 2020 @05:09PM (#23294829)
Erm, yes this is why you mock it. I still fail to see the problem, here is an example how you mock a function: https://hexdocs.pm/mock/Mock.html

Inside `with_mock` code will only access mocked function. In case you want to call original function in some condition - you have `passthrough` available inside a new function which will call the original one. So what is the problem exactly?

There are no comments on this comment yet.