-
-
Save topfunky/52512 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
// And what about block-based contexts: | |
NSString * myString = @"Bacon"; | |
[self test:@"has a class of NSString" code:^{ | |
// Old style | |
STAssertTrue([myString isKindOfClass:[NSString class]], @"Got %@ class", [myString class]); | |
// BDD style? | |
[[myString className] shouldEqual:@"NSCFString"]; | |
}]; | |
// I like this better than [[obj should] equal:32]... | |
// fewer brackets (but maybe that's too limiting if you want a custom matcher). | |
[[centigradeFreezingPoint intValue] shouldEqual:32]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment