Build failures come first
In the previous chapter, you saw how the first step to getting multiple tests to run was to write multiple tests. This caused a build failure. When you’re programming, it’s common to write code that doesn’t build at first. These are normally considered mistakes or errors that need to be fixed right away. And gradually, most developers learn to anticipate build errors and avoid them.
When following TDD, I want to encourage you to stop avoiding build errors, because the way to avoid build errors usually means that you work on enabling a new feature or making changes to code before you try to use the new feature or updated code. This means that you’re making changes while focused on the details and it is easy to overlook bigger issues, such as how easy it will be to use the new feature or updated code.
Instead, start out by writing code in the way that you think it should be used. That’s what was done with the tests. I...