Tagged in

Elixir

Perplexinomicon
Perplexinomicon
Confusion, coding, and the avoidance of stress from work
More information
Followers
26
Elsewhere
More, on Medium

Mock Responses with Stash

So a few posts ago, we looked at how to abstract dependent modules in Elixir to make testing easier. That post and its follow up attempt to implement a pattern suggested by Jose Valim, which he called explicit contract. This pattern has the following characteristics:


Real Responses from Mock Modules

A couple of weeks ago, I wrote about how to move a mock module out of your production code and into your test folder. Today we’ll follow up with a short post on getting fake responses from your mock module. For this example I’m going to use HTTP mocking, because that is…