我想测试以下方法:
- (void)myMethod
{
self.contact = nil;
[self performSegueWithIdentifier:@"segue id" sender:self];
}
这就是我在测试课上所做的:
- (void)testMyMethod
{
// Call method to test
[testClass myMethod];
// Tests
GHAssertNil(testClass.contact, @"contact should be nil.");
}
运行测试给我错误:
Reason : Receiver (<RS_MainViewController:0x126b6330>) has no segue with identifier 'segue id'
为什么我会收到此错误,解决方案是什么?