Skip to content

Instantly share code, notes, and snippets.

@tooluser
Created December 1, 2014 19:33
Show Gist options
  • Save tooluser/aec912fbc25baee8da6b to your computer and use it in GitHub Desktop.
Save tooluser/aec912fbc25baee8da6b to your computer and use it in GitHub Desktop.
subjectAction should_be even more useful
```
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