26 ms·
His example code isn't really about mock versus stub. It's about only depending on the parts (parameters passed, mostly) that you actually use, not creating ex
by angelbob 16y ago
His example code isn't really about mock versus stub. It's about only depending on the parts (parameters passed, mostly) that you actually use, not creating extra bits that mock other objects.
I agree that your test code should only specify the bits you care about. I find the mock versus stub distinction weird and artificial.
Maybe .NET people use those terms differently? I'm a Rails guy.
- latch 16y agoNo, you are right. Its about being as unspecific as the test requires. I updated a couple examples to lean more heavily on more traditional stubs; still generated by the framework, but expectation or set-response, its all canned.