The Red-Green-Refactor cycle
- Red: write a test for the next small behaviour. Run it and see it fail for the right reason.
- Green: write the simplest code that makes it pass. Elegance can wait.
- Refactor: improve names, remove duplication and simplify, re-running the tests continuously. Behaviour must not change.
Cycles should take minutes, not hours. If a step feels big, split the test.
