Skip to content

Instantly share code, notes, and snippets.

@joesus
Last active June 21, 2017 23:25
Show Gist options
  • Save joesus/504cfabf51182c169acc8741a1337ae9 to your computer and use it in GitHub Desktop.
Save joesus/504cfabf51182c169acc8741a1337ae9 to your computer and use it in GitHub Desktop.
func testCellForRow() {
let tableView = UITableView()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
let cell = dataSource.tableView(tableView, cellForRowAt: IndexPath(row: 0, section: 0))
XCTAssertEqual(cell.textLabel?.text, "Kitten: 0",
"The first cell should display name of first kitten")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment