ios - Specta and delegates -
how can test protocols , delegates in specta? have next code:
#import "specta.h" #import "sbsearchservice.h" specbegin(searchservice) describe(@"search manager", ^{ __block sbsearchservice *searchservice; beforeall(^{ searchservice = [[sbsearchservice alloc] init]; searchservice.delegate = self; }); it(@"returns @ to the lowest degree 1 result", ^asyncblock { [searchservice search:@"mustang"]; }); }); specend
i know syntax specify test conforms protocol in specta.
you utilize expecta that. go along these lines:
searchservice.conformto(@protocol(aprotocol)
ios objective-c delegates
No comments:
Post a Comment