News for hackers. Stuff that matters.
Re:How to avoid brittle code by crdoconnor on Tuesday March 29, 2016 @06:11AM (#11380501)
If the code is not well segregated you won't be able to write a clean unit test that tests the complex logic without also mocking a bunch of stuff.

That test will also often break as you refactor the various connecting APIs it surrounds.

Tests that break in the presence of changed API contracts (as opposed to bugs) are vastly less valuable than tests which only go red in the presence of a bug.

There are no comments on this comment yet.