Weitere ähnliche Inhalte
Kürzlich hochgeladen (20)
Cedar
- 13. id runLoop = nice_fake_for([NSRunLoop class]);
// do stuff
NSTimer *expectedTimer = ....;
runLoop should
have_received(@selector(addTimer:forMode:))
.with(expectedTimer, NSDefaultRunLoopMode);
Fakes/Doubles
- 15. sharedExamplesFor(@”showing an alert”, ^(NSDictionary*context){
it(@”shows an alert”, ^{...});
});
describe(@”tapping the submit button”, ^{
itShouldBehaveLike(@”showing an alert”);
});
describe(@”tapping another”, ^{
itShouldBehaveLike(@”showing an alert”);
});
Shared Examples
- 16. • Cedar (github.com/pivotal/cedar)
• PivotalCoreKit (github.com/pivotal/pivotalcorekit)
• CedarShortcuts (github.com/cppforlife/CedarShortcuts)
• BetterConsole (github.com/cppforlife/BetterConsole)