iBook Store Badge

Test Driving iOS Development with Kiwi

Kiwi and Behavior Driven Development

Before you write a line of code, figure out what you'd like to see that code do. Kiwi is designed to help you describe the object you're interested in, provide the context you are testing the object under, and express the results you expect to see. We call these tests "Specs" and you'll be writing them in no time.

Test Driving iOS Development with Kiwi

This quick start guide to BDD will get you up and running Kiwi right away. You'll add Kiwi to your project in two different ways. You'll write tests that exercise your code while fully documenting the behavior you expect. In the end, you'll customize and extend your tests to cover your entire app.


The Kiwi project is hosted on github. The code samples mentioned in this book can be downloaded from the Editor's Cut github repository. You can read more about Test Driven Development in Kent Beck's book Test Driven Development: By Example. He introduced the concept as part of the XP practices in Extreme Programming Explained: Embrace Change (2nd Edition).

 Kiwi uses RSpec style tests. You'll find a great introduction to RSpec in The RSpec Book: Behaviour Driven Development with Rspec, Cucumber, and Friends (The Facets of Ruby Series). You can read Brad Cox's early thoughts on object-oriented programming in his classic book Object-Oriented Programming: An Evolutionary Approach.