2011-08-20 41 views

回答

1

閱讀source code of SenTestingKit後,我增加了以下文件,以測試目標:」

// NSInvocation+SetTestMethodPrefix.m 

@implementation NSInvocation (SetTestMethodPrefix) 

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

@end 

這工作,但似乎是一個黑客,特別是因爲+[NSInvocation setTestMethodPrefix:]是私人

有沒有更好的。怎麼做?

相關問題