Test-driven development is a powerful software development technique where the test (or spec) is written before the implementation code. Initially, the test will fail because the implementation code does not exist yet. This situation with a failing test is expected and is known to drive out minimal implementation code changes or additions to get the failing test into a passing state. It may sound complicated at first, but with a thorough demonstration of the benefits, followed by a bit of practice, you’ll begin to prefer doing things this way.
But what happens when we don’t ...