2 ms·
Basically what Cyph0n said, fakes and mocks aren't the same thing. But it isn't quite as smelly when I see a mock (or "stub" more typically) used as an expedie
by sanderjd 4y ago
Basically what Cyph0n said, fakes and mocks aren't the same thing.
But it isn't quite as smelly when I see a mock (or "stub" more typically) used as an expedient way to create a fake to pass in as a dependency.
Like you said, it is asserting on the interactions with a mock that is what primarily smells bad to me. I very rarely (honestly I think maybe never) see this done in a way that isn't just rewriting the implementation of the method as expectations in the test.