Stub vs Spy vs Mock: Aren't they all just the same thing?
When implementing tests you may have needed to use some sort of test doubling.
In this article, I want to briefly talk about the differences between the concepts of mock, spy and stub, and how and when to use them.
Let's start with the most commonly heard concept: