tdd-three-rules
Installation
SKILL.md
The Three Rules of TDD (Uncle Bob)
Sources:
- http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
- https://blog.cleancoder.com/uncle-bob/2014/12/17/TheCyclesOfTDD.html
The Three Rules
- You are not allowed to write any production code unless it is to make a failing unit test pass.
- You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
- You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
The Four Nested Cycles
The Three Rules operate at the finest granularity, but TDD as a whole is structured as four nested cycles, each at a different timescale. Understanding all four prevents the most common failure modes.