-
Notifications
You must be signed in to change notification settings - Fork 47
Refactoring Legacy code with tests
Justin Searls edited this page Aug 20, 2015
·
5 revisions
(This page is a collection of notes and references taken from discussions during a 5 Day Training)
Concepts:
- Trusting Eclipse's Refactoring Support to help us find a testable "Seam" in the code
- Sunk-cost fallacy
- "Respond to pain by changing the source code, not masking the pain in the test or with testing tools"
- "Never trust a test you haven't seen fail"
- Primitive Obsession
- Sandi Metz's Squint Test: changes in shape indicate high complexity (loops and branching), while changes in color suggest the code operates at multiple levels of abstraction simultaneously
References:
- Michael Feathers' book, "Working Effectively with Legacy Code"
- Sandi Metz's RailsConf 2014 presentation: "All the small things", in which she explains her approach to the Gilded Rose Kata
This wiki was put together by your friends at test double. Come say hi!
- Test-driven development
- Test Doubles
- Refactoring Legacy Code
- Training Activities
- Additional Concepts