Mocks in the real world

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.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *