2011-08-20 43 views

回答

1

阅读source code of SenTestingKit后,我增加了以下文件,以测试目标:”

// NSInvocation+SetTestMethodPrefix.m 

@implementation NSInvocation (SetTestMethodPrefix) 

+ (void)load { 
    [self performSelector:@selector(setTestMethodPrefix:) withObject:@"spec"]; 
} 

@end 

这工作,但似乎是一个黑客,特别是因为+[NSInvocation setTestMethodPrefix:]是私人

有没有更好的。怎么做?