What is the difference between a mock and a stub, they both seem very similar to me?
It would be nice if someone could give a real world example of when to use which, or are they interchangeable but there is a best-practise like when to use a mock or a stub?
This is the reference in most articles, pretty generic and clear explanation:
http://martinfowler.com/articles/mocksArentStubs.html
In a nutshell:
And