mocking Archive

Are your Mocks Mocking at You?

Ever since J.B. Rainsberger’s ‘integrated tests are a scam’, many developers try to get rid of their massively integrated tests and test their units in isolation. Co-operation of units is tested with mocks and stubs. But –

Why You Don’t Get Mock Objects

Although the Ruby community has embraced TDD like no other community ever has, we have always looked at mock objects with disdain, and perhaps even a little hatred. I’ve heard conference speakers call them “Wastes of time”,

A New Approach to Mock Objects

Some say “mocks suck”, because they reduce a test’s realism and with it the confidence that the code being tested actually works. Others use mocks to demarcate the outer boundary of an application, guarding the test from

Unit Testing Patterns With Mocks and Fakes

This talk examines some common, simple patterns in code and the testing patterns that go with them. We’ll also discover what makes some code more testable than others, and how mocks and fakes can help isolate the

Speedily Practical Large-Scale Tests

Mozilla’s projects have thousands of tests, so we’ve had to venture beyond vanilla test runners to keep things manageable. Our secret sauce can be used with your project as well. Reach beyond the test facilities that came