Added protocol definitions for unit and integration specs. Added documentation for the spec environment

This commit is contained in:
Blake Watters
2011-03-09 16:05:28 -05:00
parent 779f3befb7
commit 8ed711a92a
2 changed files with 41 additions and 0 deletions

35
Docs/RUNNING_SPECS.md Normal file
View File

@@ -0,0 +1,35 @@
RestKit Spec Environment
========================
RestKit ships with a testing infrastructure built around UISpec and
an associated Ruby Gem called UISpecRunner. To be able to run the
tests, you need to do a little bit of setup:
1. Initialize the UISpec submodule: `git submodule init && git submodule update`
1. Install the Ruby Bundler Gem (if necessary): `sudo gem install bundler`
1. Install the other required Gems via Bundler: `bundle`
1. Verify the configuration by running the specs: `uispec -v`
If the project builds the UISpec target correctly and executes the suite, then
you are all set. If there are any issues, you may need to reach out to the mailing
list for help debugging.
Once your spec environment has been configured and set up, you can run the entire suite
by executing `rake` or `uispec`.
Running Specs
-------------
UISpecRunner is both a library and a general purpose CLI runner. The library works
by plugging into the application and executing specs as configured by some environment
variables.
You can use the `uispec` executable to target and run specific specs or grouping of specs
(i.e. unit, functional, integration):
* Run all specs: `uispec`
* Run a specific spec class: `uispec -s RKClientSpec`
* Run a specific spec example: `uispec -s RKClientSpec -e itShouldDetectNetworkStatusWithAHostname`
* Run all specs conforming to a protocol: `uispec -p UISpecUnit`
Common spec groupings (i.e. Units and Integration) are configured for execution via the Rakefile.

View File

@@ -9,6 +9,12 @@
#import <Foundation/Foundation.h>
#import "UISpec.h"
// Define protocols for Unit and Integration specs
@protocol UISpecUnit <NSObject>
@end
@protocol UISpecIntegration <NSObject>
@end
@interface UISpec (UISpecRunner)
/**