3 ms·
True that it gets messy. It seems like the word "mock" might be becoming a general term for what Fowler calls"test doubles". So be it. But stubs and fakes are
by solipsism 7y ago
True that it gets messy. It seems like the word "mock" might be becoming a general term for what Fowler calls"test doubles". So be it.
But stubs and fakes are roughly on opposite sides of the spectrum. Stubs are as simple as can be (doing nothing more than providing logic-free preprogrammed responses), and fakes actually work. There very word "stub" connotes that it's not a full thing, certainly not a thing that works. A stub arm is a tiny piece of an arm. Most of the arm is missing.
If we're going to call a fake a mock, fine... but let's not call a fake a stub. We don't need more confusion.