2 ms·
This is a bit of a pet peeve of mine. Good unit tests mock out all external dependencies. But, that sometimes means there's little or nothing left to test. S
by pmiller2 8y ago
This is a bit of a pet peeve of mine.
Good unit tests mock out all external dependencies. But, that sometimes means there's little or nothing left to test. Some methods are essentially glorified database calls.
I've worked in places where "write tests" is so heavily cargo culted that those kinds of tests get written. The cost is whatever time it takes to write the test, plus the amount of time it takes to execute the test, every time it's run. You also have to maintain that "test" code, and all these things have costs, which could be avoided by simply thinking about whether to write the test in the first place.