Verbose Logging

software development with some really amazing hair

17 May 09

03:00 PM MDT

Posted in Programming

Stubs vs mocks

I keep coming back to asking myself what the difference between stub and mock objects are and I have it figured out, so here it is:

Stubs just return whatever you tell them do, and that’s it. Mocks have expectations and cause tests to fail if those expectations aren’t met.

Share/Bookmark

blog comments powered by Disqus