mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 04:20:21 +08:00
Make test less brittle
This commit is contained in:
@@ -322,12 +322,11 @@
|
||||
}];
|
||||
expect(_objectManager.operationQueue).notTo.beNil();
|
||||
[_objectManager.operationQueue waitUntilAllOperationsAreFinished];
|
||||
|
||||
// Spin the run loop to allow completion blocks to fire after operations have completed
|
||||
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.02]];
|
||||
|
||||
expect(progressCallbackCount).to.equal(3);
|
||||
expect(completionBlockOperationCount).to.equal(3);
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
expect(progressCallbackCount).to.equal(3);
|
||||
expect(completionBlockOperationCount).to.equal(3);
|
||||
});
|
||||
}
|
||||
|
||||
- (void)testShouldProperlyFireABatchOfOperationsFromRoute
|
||||
|
||||
Reference in New Issue
Block a user