Sha256: abc0aa9fbc48079953efef18a8269eec0ef47c688a8958dd62752f4a662b0fa6
Contents?: true
Size: 961 Bytes
Versions: 8
Compression:
Stored size: 961 Bytes
Contents
#import "EXPMatchers+respondTo.h" #import "EXPMatcherHelpers.h" EXPMatcherImplementationBegin(respondTo, (SEL expected)) { BOOL actualIsNil = (actual == nil); BOOL expectedIsNull = (expected == NULL); prerequisite (^BOOL { return !(actualIsNil || expectedIsNull); }); match(^BOOL { return [actual respondsToSelector:expected]; }); failureMessageForTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNull) return @"the selector is null"; return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; }); failureMessageForNotTo(^NSString *{ if (actualIsNil) return @"the object is nil/null"; if (expectedIsNull) return @"the selector is null"; return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; }); } EXPMatcherImplementationEnd
Version data entries
8 entries across 8 versions & 2 rubygems