document updated 13 years ago, on Jun 22, 2011
"The First Step in Refactoring: Whenever I do refactoring, the first step is always the same. I need to build a solid set of tests for that section of code."
TDD + refactoring
- TDD development is hard
- How to determine at what scope I should write a test. What tests provide value at the high level? What tests provide value at the low level?
- Make sure you capture behavior and not implementation details
- Learning not to over-mock
- Force yourself to write only enough code to make the test pass. My favorite technique to prevent unnecessary complexity is the "Fake it (Til You Make It)" approach.