Considering that the same message dispatching mechanism is used for both instance and class methods, you can safely spy on class methods.
@interface MyObject: NSObject
+ (void)doNoOpWithObject:(NSObject*)obj;
@end
@implementation MyObject
+ (void)doNoOpWithObject:(id)object {}
@end
SPEC_BEGIN(StaticSpy)
it(@"captures static method arguments", ^{
KWCaptureSpy *spy = [MyObject captureArgument:@selector(doNoOpWithObject:) atIndex:0];
[MyObject doNoOpWithObject:@18];
[[spy.argument should] equal:@18];
});
SPEC_END