7 ms·
Fakes not Mocks- I hopped on this train and am super happy. I start out with a small & simple fake for something as I'm working on the layer above it, then kee
by randomfool 6y ago
Fakes not Mocks- I hopped on this train and am super happy.
I start out with a small & simple fake for something as I'm working on the layer above it, then keep flushing it out as I move on to higher and higher layers.
In the end I have a suite of completely customizable fakes for all of my external dependencies that I can tweak to my every need.
- globular-toast 6y agoFlushing it out or fleshing it out?
- iamsb 6y agoI have tried using fakes over mocks, but it becomes cumbersome if it is a large-ish code base with handful of developers contributing to it. Keeping expectations on what a particular Fake does gets contentious. Mocks however usually allow a developer to encapsulate entire mock behavior within the boundaries of a unit test. I am curious to know if you ran into similar problem, if you did how you managed to overcome it?
- mumblemumble 6y agoThis seems like an odd assertion to make, since fakes and mocks have largely non-overlapping purposes. Fakes provide some simulacrum of real behavior, while mocks just verify that appropriate messages were sent to the thing they're standing in for. I do see fakes as having overlapping purpose with stubs, though. But, like the title of the article says, mocks aren't stubs.