Every week or so, there is a new thread asking about testing some kind of an external side effect. Inevitably, people recommend five different mocking libraries, each with its own set of drawbacks, and everyone says that their particular use case doesn’t work with at least three of those.
This obviously seems way more complicated than it should be, but what’s worse, it ignores hard earned knowledge about good testing practices. Mocking something that happens ten layers deep in the code that is being tested, always results in tests that know too much, and therefore break too easily.






















