O'Reilly logo
  • Julio Barrera thinks this is interesting:

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.


Cover of Test-Driven iOS Development with Swift 3


No me saliĆ³ el ejercicio.