Sha256: 92129de47f540153d5a9c8143a4f761425b16e9886464f16ffe35370965c36d4
Contents?: true
Size: 728 Bytes
Versions: 6
Compression:
Stored size: 728 Bytes
Contents
#import "XCTestCase+Specta.h" #import "SPTXCTestCase.h" #import "SPTExample.h" #import <objc/runtime.h> @interface XCTestCase (xct_allSubclasses) - (NSArray *)xct_allSubclasses; @end @implementation XCTestCase (Specta) + (void)load { Method xct_allSubclasses = class_getClassMethod(self, @selector(xct_allSubclasses)); Method xct_allSubclasses_swizzle = class_getClassMethod(self, @selector(xct_allSubclasses_swizzle)); method_exchangeImplementations(xct_allSubclasses, xct_allSubclasses_swizzle); } + (NSArray *)xct_allSubclasses_swizzle { NSMutableArray *subclasses = [[self xct_allSubclasses_swizzle] mutableCopy]; // call original [subclasses removeObject:[SPTXCTestCase class]]; return subclasses; } @end
Version data entries
6 entries across 6 versions & 1 rubygems