In this chapter, we looked at how to implement a view controller with a table view using TDD. We split the table view controller into code that manages the view hierarchy and code for the data source, and the delegate of the table view.
We discussed how to write tests to drive the development of subviews, outlets, and actions, and how to use fake objects to isolate the microfeature to be tested. The usage of mock objects allowed us to create fast, isolated, and reliable tests. This way, we were able to write tests for the table view cell without the need to instantiate the real data source of the table view.
Next, we implemented the detail view controller using TDD. We added MapKit to the project in order to show the location of the to-do item in case a user added an address.
Finally, we wrote tests to drive the implementation of the input view controller. We also looked...