Now that you know how to write mocks and stubs and how you can write powerful tests with them, it is time to discuss best practices. As you can imagine, some developers are big fans of mocking. Others believe mocks should not be used. It is a fact that mocks make your tests less real.
When should we mock? When is it best not to mock? What other best practices should I follow? I tackle those questions next.
Leave a Reply