Created
December 1, 2014 19:33
-
-
Save tooluser/aec912fbc25baee8da6b to your computer and use it in GitHub Desktop.
subjectAction should_be even more useful
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
``` | |
describe(@“response to a network request or whatnot”) | |
subjectAction(^{ something that triggers the response}) | |
context(@“When there’s a success of type A”); | |
context(@“When there’s a success of type B”); | |
context(@“When there’s a success of type C”); | |
. . . . | |
context(@“when there is an error”) | |
beforeEach(^{ | |
response = responseThatTriggersError; | |
}); | |
it(“should display an alert”); | |
context(“when the user touches ‘ok’”) | |
beforeEach({ | |
[[UIAlertView currentAlertView] dismissWithOKButton]; | |
}); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment