3 ms·
re: pains of unit tests when refactoring -- i.e. my experience with poorly written unit tests i took over a project once from a crazy person that had a ton of
by danek 17y ago
re: pains of unit tests when refactoring --
i.e. my experience with poorly written unit tests
i took over a project once from a crazy person that had a ton of unit tests in it. about 50% of the tests were dumb, so i deleted those (seriously, things like instantiating an object and then testing that it wasn't null).
I tried to maintain the rest of the tests as I worked with the code, but what I found was that there were so many tests, and most of them were testing the most pointless trivial things, that keeping them around was taking more time than it was worth, so I axed those too. the remaining tests that actually tested stuff, were testing parts of the design that were done so ridiculously that they needed unit tests. So I just got rid of all the tests and refactored the hell out of the code. I ran it through the debugger a few times and all was good. the end.
oh, then a few months later the company changed its business model and they didn't need that subsystem anymore. go figure.