From bb4c19eab61892ad84da081b12931f5bd8682b49 Mon Sep 17 00:00:00 2001 From: Blake Watters Date: Sat, 11 May 2013 13:35:36 -0400 Subject: [PATCH] Add section to the README.md detailing how to setup and execute the unit tests --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7224906..de2f414 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,21 @@ If you are using AFNetworking 1.0 in your non-arc project, you will need to set To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all AFNetworking source files, press Enter, insert `-fobjc-arc` or `-fno-objc-arc` and then "Done" to enable or disable ARC for AFNetworking. +## Unit Tests + +AFNetworking includes a suite of unit tests within the Tests subdirectory. In order to run the unit tests, you must install the testing dependencies via CocoaPods. To do so: + +1. `gem install cocoapods` # If necessary +1. `cd Tests` +1. `pod install` + +Once CocoaPods has finished the installation, you can execute the test suite via the 'iOS Tests' and 'OS X Tests' schemes within Xcode. If you wish to execute the tests from the command line or within a continuous integration environment, you will need to install [xctool](https://github.com/facebook/xctool). The recommended installation method is [Homebrew](http://mxcl.github.io/homebrew/). To install the commandline testing support via Homebrew: + +1. `brew update` +1. `brew install xctool --HEAD` + +Once xctool is installed, you can execute the suite via `rake test`. + ## Credits AFNetworking was created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla).