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.

From

Cover of Test-Driven iOS Development with Swift 3

Note

No me saliĆ³ el ejercicio.