Pattern for unit testing async queue that calls main queue on completion
问题 This is related to my previous question, but different enough that I figured I'd throw it into a new one. I have some code that runs async on a custom queue, then executes a completion block on the main thread when complete. I'd like to write unit test around this method. My method on MyObject looks like this. + (void)doSomethingAsyncThenRunCompletionBlockOnMainQueue:(void (^)())completionBlock { dispatch_queue_t customQueue = dispatch_queue_create("com.myObject.myCustomQueue", 0); dispatch