Demonstrating the Discipline
An Engineer with this core skill must be able to demonstrate the ability to follow this discipline religiously.
Test-Driven Development is defined as a discipline with three rules:
- You MUST write a failing test before you write any production code.
- You MUST not write more of a test than is sufficient to fail, or fail to compile.
- You MUST not write more production code than is sufficient to make the currently failing test pass.
- Writes a failing test before writing production code
- Watches the failing test fail for right reason before writing production code
- Writes only the minimum production code for a test to pass
- Watches the passing test pass before moving onto refactoring
- Refactors tests
- Refactors production code