Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active September 7, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/a1fc86c6d3e31fce3a95017d963eab7e to your computer and use it in GitHub Desktop.
Save chelseatroy/a1fc86c6d3e31fce3a95017d963eab7e to your computer and use it in GitHub Desktop.
View Controller Unit Test
func testNavigateToView_loadsView() {
let controller = ExampleViewController.loadFromStoryboard()
assertThat(controller.view, present())
UIWindow.present(viewController: controller) { () in
assertThat(controller.someTextLabel.text, presentAnd(equalTo("Why hello there!")))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment