3 ms·
I don’t understand what this means. The difference between a stub and a mock is about the object under test, not the collaborators that are being replaced with
by tomstuart 12y ago
I don’t understand what this means.
The difference between a stub and a mock is about the object under test, not the collaborators that are being replaced with doubles. We use a mock when we want to test the object’s interactions with its collaborators; we use a stub when we don’t care about the interactions, only about the values that result from them.
What does that decision have to do with whether the interface is small and well-defined?