Your SlideShare is downloading. ×
0
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Cedar
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Cedar

96

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
96
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×