On to the next problem: we need to make sure that the table view is reloaded when an item is added to the item manager. A perfect place for the reload is viewWillAppear(_:). As an exercise, add this test to ItemListViewControllerTests. You may need a mock for the table view to register when reloadData() is called. A reminder: to trigger viewWillAppear(_:), do this in your test:sut.beginAppearanceTransition(true, animated: true) sut.endAppearanceTransition() Write the test as an exercise.
No me salió el ejercicio.
Share this highlighthttp://www.safaribooksonline.com/a/test-driven-ios-development/5330428/