by timscott · 15y ago · 0 comments
However, I gotta say it. If unit tests are making it harder to restructure your code, you're doing it wrong. The opposite should be true. The greatest purpose of unit tests is to add comfort and safety (and thus speed) to very big refactors and restructuring. If your system behavior changes, yes, your tests gotta change, and that takes effort. But if you restructure your code (e.g., break it apart to add an intermediate abstraction) and unit tests slow you down because you got get all up in 'em, then brother you got yourself some bad tests. Those should not have written.
No comments yet.