Elektrine lite

← Feed

@jbrains@mastodon.social

Post #1386669

2026-04-14 17:44 UTC

@PeterSommerlad Aha! This is one of the arguments I expected: perfume hides the smell, so we won't clean the room. I simply can't attribute this failure to the mocking framework any longer. That is not the problem. That said, we can't ignore behavioral economics. So... what are the signals of dependency problems, even when mocking libraries do all the boring stuff? Things such as long tests, too many details in one test, and tests failing for strange reasons.

Replies (1)

  • @jbrains@mastodon.social 2026-04-14 17:46

    @PeterSommerlad Good news! These are general properties of tests that point to design problems, usually dependency problems. These signals are not limited to tests that use mock objects. Even so, many programmers seem to accept those symptoms of dependency problems as inevitable outcomes of writing unit tests. This becomes a deeper problem whose solution lies nowhere near "to use mock objects are not to use mock objects".

    Open ##1386671