Last active
February 27, 2017 07:42
-
-
Save TheAdamBorek/ffa76257c3642c4cf406ce3bece8a816 to your computer and use it in GitHub Desktop.
This file contains 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
func test_receiveImage_onButtonClick_version2() { | |
let buttonTaps = testScheduler.createHotObservable([next(100, ()), next(200, ())]) | |
buttonTaps.bindTo(subject.chooseImageButtonPressed) | |
.disposed(by: rx_disposeBag) | |
let observer = testScheduler.createObserver(UIImage.self) | |
self.subject.image.drive(observer) | |
.disposed(by: self.rx_disposeBag) | |
testScheduler.start() | |
let expectedEvents = [ | |
next(100, imageHavingMock.expectedImage), | |
next(200, imageHavingMock.expectedImage) | |
] | |
XCTAssertEqual(observer.events, expectedEvents) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment