News for hackers. Stuff that matters.
Re:Zig, Skia, Clojure, Geometry and the Japanese TV Show: IC... by Mawr on Friday July 16, 2021 @05:49AM (#27854584)
Then the original code is perfectly fine and does not need refactoring. You create the mocks you need with cleanup defers and you're done.

You could just make a function that creates all the mocks needed for all tests, but you don't like that. So the only option left is to specify which mocks you need for each test... which is exactly what the original code is doing.

You're running into a wall because you're trying to abstract code that's already maximally abstracted.

There are no comments on this comment yet.