Last active
January 25, 2017 02:01
-
-
Save chelseatroy/2bd9ae2c9f017c21c711b4ac6c79d659 to your computer and use it in GitHub Desktop.
Test Screen Transition iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
import Hamcrest | |
@testable import MyExampleApp | |
class ExampleViewControllerTest: XCTestCase { | |
... | |
func testNavigatesToOtherScreen() { | |
let controller = ExampleViewController.loadFromStoryboard() | |
assertThat(controller.view, present()) | |
UIWindow.present(viewController: controller) { () in | |
controller.didTapButtonToGoToOtherViewController(NSObject()) | |
assertThat(controller.presentedViewController, presentAnd(instanceOf(OtherViewController))) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment