Cedar is a BDD-style Objective-C testing framework with an expressive matcher DSL and convenient test doubles.
describe(@"Example specs on NSString", ^{
it(@"lowercaseString returns a new string with everything in lower case", ^{
[@"FOOBar" lowercaseString] should equal(@"foobar");
});
it(@"length returns the number of characters in the string", ^{
[@"internationalization" length] should equal(20);
});
describe(@"isEqualToString:", ^{
it(@"should return true if the strings are the same", ^{
[@"someString" isEqualToString:@"someString"] should be_truthy;
});
it(@"should return false if the strings are not the same", ^{
[@"someString" isEqualToString:@"anotherString"] should be_falsy;
});
});
});
With Xcode 7, Apple has introduced changes to XCTest.framework
which are incompatible with Cedar's test bundle
runner. (See #333 for more details.) Support for Xcode 7 is
being actively developed on the Xcode7
branch which should be
used until we feel that the Xcode 7 betas have stabilized and we are ready to merge this work into the master
branch.
- Install the Xcode command line tools package (Under the Preferences tab 'Downloads') if you haven't already done so
- Run the following in a terminal to install Xcode templates for ease of use:
$ curl -L https://raw.github.com/pivotal/cedar/master/install.sh | bash
- If you wish to specify a version. Run the following command: (version_name is v0.11.0, v0.10.0 etc...)
$ bash <(echo "set -- --version 'version_name'; $(curl -L https://raw.github.com/pivotal/cedar/master/install.sh)")
- Or if you want to install from HEAD. Run:
$ bash <(echo "set -- --head; $(curl -L https://raw.github.com/pivotal/cedar/master/install.sh)")
- Restart Xcode
- Add new targets or files to your project using the Xcode templates, or create a new project to test-drive from scratch
- Start writing specs!
Documentation can be found on the Cedar Wiki.
- Search past discussions: http://groups.google.com/group/cedar-discuss
- Send an e-mail to the discussion list: mailto:cedar-discuss@googlegroups.com
- View the project backlog on Pivotal Tracker: http://www.pivotaltracker.com/projects/77775.
- Follow us on twitter: @cedarbdd
Please read the Contributor Guide on the wiki.
- Andrew Kitchen (akitchen), Pivotal Labs, San Francisco
- Brian Croom (briancroom), Pivotal Labs, Toronto
- Jeff Hui (jeffh), Pivotal Labs, San Francisco
- Sam Coward (idoru), Pivotal Labs, New York
- Tim Jarratt (tjarratt), Pivotal Labs, San Francisco
Copyright (c) 2010-2014 Pivotal Labs. This software is licensed under the MIT License.