Skip to content

Instantly share code, notes, and snippets.

@joesus
Last active June 19, 2017 17:31
Show Gist options
  • Save joesus/fdbd0fcd026c2f197573ffb7ec8dab60 to your computer and use it in GitHub Desktop.
Save joesus/fdbd0fcd026c2f197573ffb7ec8dab60 to your computer and use it in GitHub Desktop.
func testTableViewDataSourceIsKittenDataSource() {
guard let controller = UIStoryboard(name: "Main", bundle: Bundle(for: ViewController.self)).instantiateInitialViewController() as? ViewController else {
return XCTFail("Could not instantiate ViewController from main storyboard")
}
controller.loadViewIfNeeded()
XCTAssertTrue(controller.tableView.dataSource is KittenDataSource,
"TableView's data source should be a KittenDataSource")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment