Last active
February 27, 2017 07:05
-
-
Save TheAdamBorek/de6e451707db10714a3372a55ce264b2 to your computer and use it in GitHub Desktop.
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
final class ImageHavingStub: ImageHaving { | |
var expectedImage = UIImage() | |
var givenError: Error? = nil | |
var image: Observable<UIImage> { | |
if let error = givenError { | |
return .error(error) | |
} | |
return .just(expectedImage) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment