3 ms·
"Maybe you're using a library that is difficult to mock. Maybe most of your logic is happening at the db layer." At this point, your design is already screwed
by jbooth 11y ago
"Maybe you're using a library that is difficult to mock. Maybe most of your logic is happening at the db layer."
At this point, your design is already screwed and borderline-unmaintainable, so yeah, I guess unit tests won't help much. But when people talk about Doing it Right, usually they mean having a codebase that's loosely coupled enough that tests are relatively simple to write.