Permalink
Browse files

Update Example section for clarity

  • Loading branch information...
1 parent 447f8fa commit b21a19d26b1e29d9b5995d9275e0534744e98662 @blakewatters blakewatters committed Mar 28, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 README.md
View
@@ -24,14 +24,21 @@ Otherwise add all files in `Code` directory to your unit testing bundle target.
## Usage
``` objective-c
-#import "RKMappingTestMatcher.h"
+#import <RestKit/RestKit.h>
+#import <RestKit/CoreData.h>
+#import <RestKit/Testing.h>
+#import <RKKiwiMatchers/RKKiwiMatchers.h>
SPEC_BEGIN(GGMappingsSpec)
registerMatchers(@"RK");
context(@"when object mapping a GGAirline", ^{
+ __block NSData *fixtureData;
+ __block RKMappingTest *mappingTest;
+
beforeEach(^{
+ RKManagedObjectStore *managedObjectStore = [RKManagedObjectStore defaultStore];
fixtureData = [RKTestFixture parsedObjectWithContentsOfFixture:@"Fixtures/airlines/1.json"];
mappingTest = [RKMappingTest testForMapping:[mappings airlineResponseMapping] sourceObject:fixtureData destinationObject:nil];
mappingTest.mappingOperationDataSource = [[RKManagedObjectMappingOperationDataSource alloc] initWithManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext cache:nil];

0 comments on commit b21a19d

Please sign in to comment.