The UIViewController TDD screencast ended with all the code in the view controller. Unfortunately, this is where many iOS programmers leave things! Let’s TDD our way to something better…
In part 2, we pick up from there and TDD to extract a model class, which the controller observes. You’ll see it evolve into true Model-View-Controller, driven by unit tests.
Improve your test writing “Flow.”
Sign up to get my test-oriented code snippets.
In particular, you’ll see how to TDD:
- a model that posts notifications when it changes, and
- a controller that observes those notifications.
- My review of Graham Lee’s book Test-Driven iOS Development
- Why AppCode is Nice
- TDD: 4 questions that will help you create the simplest thing that could possibly work by Roy Osherove
Question: What difficulties do you face when trying to TDD your code? Leave a comment below.
“Do it now” sound by freesound