Announcing Cedar target templates for Xcode 4.3.x: Getting started with Cedar has never been easier!
These templates let you quickly add Cedar targets to your iOS or Mac OS X project. It’s super simple to build and install from source now:
git clone http://github.com/pivotal/cedar --recursive && cd cedar ; rake install
If you don’t like building from source, you can also install a build of the Cedar templates from the downloads page – just untar to your home directory.
Using Cedar Templates
Restart Xcode after installing, open your project and add a new target. You’ll find targets for both iOS and Mac OS X. There are 2 types of targets: Suites and Bundles. A Suite target will build your tests as a separate application which you then run to execute your tests. Bundle targets work just like OCUnit testing bundles, providing closer integration with Xcode. If you do create a bundle target, make sure to edit the scheme of your application and add the new target to the list of tests.
Every template comes with a simple example which should run out of the box to help you get running.
ARC: A word of caution
Automatic Reference Counting setting: Don’t use it for your spec targets. Your application is free to use ARC, just don’t use it for any Cedar targets. This is because there is a flaw in the compiler that ships with Xcode (see here for the details, and if you care please feel free to use this information to file a bug with apple).
Have fun speccing
We really hope these changes help you to get started writing specs and spending less time setting up Cedar. If you have any feedback, whether it’s about these templates or something else about Cedar, please feel welcome stop by the discussion group and share your thoughts.
About the AuthorMore Content by Sam Coward