Created
May 22, 2014 20:22
-
-
Save klaaspieter/2c2923fe3d8ea64ca103 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
describe(@"when the retry button is tapped", ^{ | |
before(^{ | |
_fetcher = mock([ProductFetcher class]); | |
_viewController.productFetcher = _fetcher; | |
[_viewController.errorView.button sendActionsForControlEvents:UIControlEventTouchUpInside]; | |
}); | |
it(@"retries fetching the products", ^{ | |
[verify(_fetcher) fetch]; | |
}); | |
it(@"has a visible loading view", ^{ | |
expect(_viewController.loadingView).to.beVisible(); | |
}); | |
it(@"has a hidden error view", ^{ | |
expect(_viewController.errorView).to.beInvisible(); | |
}); | |
it(@"has a hidden content view", ^{ | |
expect(_viewController.contentView).to.beInvisible(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment