使用 SenTestingKit 运行测试时,它们不会在块内正确失败,例如
operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request
success:^(NSURLRequest *req, NSHTTPURLResponse *response, id jsonObject){
STFail(@"This does not fail");
}
failure:^(NSURLRequest *req, NSHTTPURLResponse *response, NSError *error, id jsonObject){
STFail(@"Neither does this");
}];
[operation start];
STFail(@"But this fails fine");
我错过了什么?