Chapter 7. Working Incrementally
Now let’s address our real problem, which is that our design only allows for one global list. In this chapter I’ll demonstrate a critical TDD technique: how to adapt existing code using an incremental, step-by-step process which takes you from working state to working state. Testing Goat, not Refactoring Cat!
Small Design When Necessary
Let’s have a think about how we want support for multiple lists to work.
At the moment the only URL for our site is the homepage, and that’s why there’s only one global list. The most obvious way to support multiple lists is to say that each list gets its own URL, so that people can start multiple lists, or so that different people can have different lists. How might that work?
Not Big Design Up Front
TDD is closely associated with the agile movement in software development, which includes a reaction against Big Design Up Front, the traditional ...
Get Test-Driven Development with Python, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.