Skip to main content
CODING-FUNDAMENTALS5 MIN READ

Red Green Refactor Recall Deck

Recall what each TDD phase is for and which shortcuts weaken the loop.

RGR What does Red-Green-Refactor stand for? Acronym "I will refactor before I make the test pass." The code looks messy while the new behavior is still red. Your line "First I will make the behavior pass, then refactor with the test guarding me." Refactoring while red mixes design changes with missing behavior and makes failures harder to interpret. The response preserves phase discipline. Trap Behavior test or implementation test? Prefer tests that describe the behavior contract unless internals are the contract. Compare When is the refactor phase allowed? After the behavior is green and the tests can tell you if…

Read the full lesson

Sign up free — one personalized lesson every day, matched to your role and goals.

Already have an account? Sign in

← Back to library
Contact us