Stubbing I/O in Yesod

I’ve seen people struggle with figuring out how to stub IO actions in Yesod request handlers for writing automated tests.

Here’s a simple example of one way to approach this.

9 Likes