I am trying to run a kiwi test, it doesn't evaluate the kiwi statement on the inner block. But it will evaluate any test statements outside the block. What do I do? :
- (void) jsonTest:(void (^)(NSDictionary *model))jsonData{
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[manager GET:@"http://api.somesite.com" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
if(jsonData){
jsonData((NSDictionary *)responseObject);
}
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
jsonData(nil);
}];
}
describe(@"Networking", ^{
it(@"Get Sample JSON", ^{
[[NetworkingUtil alloc] jsonTest:^(NSDictionary *model){
NSString * result = [model objectForKey:@"Host"];
NSLog(@"result :: %@", result);
[[result should] equal: @"host.value.name"];
}];
//kiwi evaluates this test statement though...
[[theValue(41) should] equal:theValue(42)];
}];