Stubs vs Mocks: The difference
Many people don't get the difference between Stubs and Mocks. We all know they replace methods and classes when testing, but this is the main difference:
Mocks have expectations. Stubs don't.
This means that for a Mock there are assertions whether or how it gets called. And with a stub there is none.
Written by Daniel Rios
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#