The history of test doubles
Test doubles are objects that are used to replace real objects in tests. They are used to isolate the code being tested from its dependencies, to simplify the code being tested, or to speed up tests. There are five main types of test doubles mocks, stubs, fakes, dummies, and spies. Mocks are used to simulate the behavior of real objects. Stubs are used to provide canned responses to method calls. Fakes implement the same interface as real objects but with simplified or simulated behavior. Dummies do nothing. Spies track how real objects are being used.