Quantcast
Channel: no mocks – Arlo Being Bloody Stupid
Browsing latest articles
Browse All 16 View Live

Decoupled Design

Recently, I’ve had a large number of discussions around the use of mocks for testing, probably because I keep saying that Mocks are Evil. As a result, I’ve had to articulate how I design systems. This...

View Article



Mock Free Example, Part 1: Project Intro

Previously, I presented mocks as nuclear weapons. Unsurprisingly, commenters wanted examples. I exist to serve. This series will discuss a partly-completed project that I have lying around. The project...

View Article

Mock Free Example, part 2: Simulators

One of the common uses for mocks is to replace expensive or stateful components, such as file systems, networks, GUIs, and databases. However, I also see a cluster of other problems that arise at...

View Article

Mock Free Example, Part 3: Fixing Untestable Code Sequences

In my character printer, at one point I had some code like this monstrosity. I know it’s a monster, because testing it Requires at least one test double (the _character field). Involves running a bunch...

View Article

New Simulators Library

I just published an early relese of my Simulated.FileSystem library. This library makes it easier to separate platform concerns out of my models. It works really well with a hexagonal architecture....

View Article


Easily Eliminate Most Mocks

In previous discussions about mock-free unit testing, I’ve shown techniques that I use to eliminate the hard-to-eliminate test doubles. I’ve skipped the simple techniques that I apply all the time....

View Article

Mock Free Example 4: Everything’s Better with Async

In the previous post in this series (“last week” to those who didn’t read it over a year ago), I made simple code complicated in the effort to make it unit testable. It was all going along fine, until...

View Article

The No Mocks Book

Recently on twitter, Clayton asked for a good book about unit testing without mocks. I don’t believe such a thing can be written, so I’ll try to write it in one blog post. First, here it is in one...

View Article

Browsing latest articles
Browse All 16 View Live




Latest Images