I'm adding some unit tests into my project and want to test that a method will accept nil as block parameter and not crash when it then attempts to execute the block. The unit test I've created so far is:
- (void) testNilBlock
{
NSTimeInterval timeDelay = 0.2f;
[self.objectBlockTest performBlock:nil
afterDelay:timeDelay];
//Assert for non-exception
}
But I can't work out how to test for the exception with the built in time delay.