- Add a test
- Run all tests. The new test should fail for expected reasons
- Write the simplest code that passes the new test
- All tests should now pass
- Refactor as needed, using tests after each refactor to ensure that functionality is preserved
- The cycle above is repeated for each new piece of functionality.
- Tests should be small and incremental, and commits made often.