• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cedar
 

Cedar

on

  • 217 views

 

Statistics

Views

Total Views
217
Views on SlideShare
217
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cedar Cedar Presentation Transcript

    • CedarTesting in iOSJeff Hui
    • WhyTest?
    • WhyTest?•Catch regressions
    • WhyTest?•Catch regressions•Better design
    • WhyTest?•Catch regressions•Better design•Refactor more confidently
    • Why Cedar?
    • Why Cedar?•Cross-platform
    • Why Cedar?•Cross-platform•Fast
    • Why Cedar?•Cross-platform•Fast•Elegant DSL
    • describe(@”bowler”, ^{beforeEach(^{// do stuff});describe(@”-score”, ^{context(@”when having a perfect game”, ^{it(@”should return a perfect score”, ^{});});});});
    • value should equal(@”someString”);
    • value should equal(5);
    • id runLoop = nice_fake_for([NSRunLoop class]);// do stuffNSTimer *expectedTimer = ....;runLoop shouldhave_received(@selector(addTimer:forMode:)).with(expectedTimer, NSDefaultRunLoopMode);Fakes/Doubles
    • spy_on(controller.textField);[controller.textField becomeFirstResponder];controller.textField shouldhave_received(@selector(becomeFirstResponder));Spies
    • 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
    • • Cedar (github.com/pivotal/cedar)• PivotalCoreKit (github.com/pivotal/pivotalcorekit)• CedarShortcuts (github.com/cppforlife/CedarShortcuts)• BetterConsole (github.com/cppforlife/BetterConsole)