Slide 44
Slide 44 text
✴ Refactoring turns green to red —
the behavior is
fi
ne, but the test breaks.
✴ The test locks in calls, args, and order —
it knows the inside too well.
✴ It asserts "HOW it's done," not "WHAT it should do.”
✴ Good tests should survive any refactor,
but a fragile test can’t.
Overused Mocks = Fragile Tests
#1 The difference between mocks and stubs