title: Restkit How can I test nested relationship data by Fixture?
body: <p>I followed the example from github and try testing my own RKModels:</p>
  
  <p><a href="https://github.com/RestKit/RestKit/wiki/Unit-Testing-with-RestKit" rel="nofollow">RestKit Unit Testing</a></p>
  
  <p>After starting my unit testing on Restkit using fixtures, I cannot find pass the test case which they test the mapping of nested relationship data.</p>
  
  <hr>
  
  <p>My Fixture - articles.json:</p>
  
  <pre><code>{
  "articles": [
               {
               "title": "RestKit Unit Testing",
               "author": "Blake Watters",
               "tags": [
                        "RestKit",
                        "testing",
                        "tutorials"
                        ]
               },
               {
               "title": "RestKit Unit Testing2",
               "author": "Blake Watters",
               "tags": [
                        "RestKit",
                        "testing",
                        "tutorials"
                        ]
               },
               {
               "title": "RestKit Unit Testing3",
               "author": "Blake Watters",
               "tags": [
                        "RestKit",
                        "testing",
                        "tutorials"
                        ]
               }
               ]
  }
  </code></pre>
  
  <hr>
  
  <p>My Test Case:</p>
  
  <pre><code>- (void)testArticlesMapping
  {
      id parsedJSON = [RKTestFixture parsedObjectWithContentsOfFixture:@"articles.json"];
  
  
      RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[RKArticle class]];
      [mapping addAttributeMappingsFromDictionary:@{
                                                    @"title":   @"title",
                                                    @"author":  @"author",
                                                    @"tags":    @"tags"
                                                    }];
  
      RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping method:RKRequestMethodAny pathPattern:nil keyPath:@"articles" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
  
      [[RKObjectManager sharedManager] addResponseDescriptor:responseDescriptor];
  
      RKMappingTest *test = [RKMappingTest testForMapping:mapping sourceObject:parsedJSON destinationObject:nil];
  
      [test addExpectation:[RKPropertyMappingTestExpectation expectationWithSourceKeyPath:@"title" destinationKeyPath:@"title" value:@"RestKit Unit Testing"]];
      [test addExpectation:[RKPropertyMappingTestExpectation expectationWithSourceKeyPath:@"author" destinationKeyPath:@"author" value:@"Blake Watters"]];
      [test addExpectation:[RKPropertyMappingTestExpectation expectationWithSourceKeyPath:@"tags" destinationKeyPath:@"tags" value:@[ @"RestKit", @"testing", @"tutorials"]]];
  
  
      XCTAssertTrue([test evaluate]);
      XCTAssertNoThrow([test verify]);
  }
  </code></pre>
  
  <hr>
  
  <p>The fixture is loaded, however it received an error:</p>
  
  <blockquote>
    <p>(([test evaluate]) is true) failed: throwing "0x112701a20: failed with
    error: Error Domain=org.restkit.RestKit.ErrorDomain Code=1003 "No
    mappable values found for any of the attributes or relationship
    mappings" UserInfo=0x112703bb0 {NSLocalizedDescription=No mappable
    values found for any of the attributes or relationship mappings}</p>
  </blockquote>
  
  <p>It seems it cannot find the nested value because the responseDescriptor is not set yet.
  How can I solve these testing of nested relationship data? </p>
  
  <p>Great Thanks!</p>