Skip to content

Instantly share code, notes, and snippets.

@TheAdamBorek
Created February 26, 2017 13:37
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 TheAdamBorek/ac33eadf45fc954a300a18df75db6d83 to your computer and use it in GitHub Desktop.
Save TheAdamBorek/ac33eadf45fc954a300a18df75db6d83 to your computer and use it in GitHub Desktop.
func test_receiveImage_onButtonClick() {
var resultImage: UIImage!
subject.image.drive(onNext: { image in
resultImage = image
}).disposed(by: rx_disposeBag)
buttonTap.onNext(())
XCTAssertEqual(resultImage, imageHavingMock.expectedImage)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment