HN2new | past | comments | ask | show | jobs | submitlogin

I have found one situation where these types of tests are useful to me. I'm working on a system full of legacy code and nearly devoid of tests. Most of the time a simple refactoring will make whatever feature or defect I'm working on much easier, but I'm loath to refactor without tests in place. The current design of the code doesn't allow for easy testing, so I'll write some tests using mocks to verify behavior. Then I can refactor with a little more peace of mind.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: