Re:Mocks Aren't Stubs (2007)
by gary_bernhardt on Monday November 14, 2016 @09:11PM
(#12955091)
Spies are a different thing: they allow any interaction, recording it all so that you can inspect it layer. Python's "mock" library, for example, is mostly a spy library.
[ Parent
| on HN ]
> Python's "mock" library, for example, is mostly a spy library.
It's almost as if the experts don't all agree with this terminology.
Edit: This was a bit too snarky, but truthfully, I don't see evidence in the field that these definitions are widely used. I see evidence that an very small crowd is using these terms and asserting their correctness. Meanwhile the rest of the industry thinks anything they use as a "double" in a test is a "mock".
Even the people writing widely-used mocking libraries aren't using this terminology consistently.