~rlamacraft/Playing_with_monadic_mocking

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~rlamacraft/Playing_with_monadic_mocking
read/write
git@git.sr.ht:~rlamacraft/Playing_with_monadic_mocking

You can also use your local clone with git send-email.

This repo is just a little bit of playing that I did with how typeclasses can be used to decouple monadic functions from any particular monad so that they can be unit tested.

When testing we don't want to use the IO monad because then we would have to spin up filesystems, databases, etc. Instead we want a much simpler monad that captures those effects in a way that we can assert the correct behaviour.