Outside-In TDD: The London School
Outside-in TDD is also commonly know as the London School of TDD, acceptance test driven development (ATDD) or Mockist TDD. In Outside-In TDD, we use mocks to sketch the design of parts of the system we don't know much about yet.
Contrary to classic TDD, we don't wait to create a mess to extract sub-components; we use mocks to sketch them as soon as we write a test. Whereas in classic TDD, most design decisions happened in the refactoring phase, in Outside-In TDD, the design decisions about public interfaces happen in the red stage.
Here, the concept of responsibility becomes key. Identifying the different responsibilities gives us an idea of the kind of collaboration we might need. There is no need to implement the sub-module in this stage, however, because we can stub it and fake its behavior for our test.
This operation is a crucial design decision in itself, because what we are doing here is designing the public interface of...