diff --git a/Source/OCMock/OCMBlockCaller.m b/Source/OCMock/OCMBlockCaller.m index f8e4def0..4a2fbaf1 100644 --- a/Source/OCMock/OCMBlockCaller.m +++ b/Source/OCMock/OCMBlockCaller.m @@ -43,4 +43,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation } } +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]: Calls `%@`", [self class], self, block]; +} + @end diff --git a/Source/OCMock/OCMExceptionReturnValueProvider.m b/Source/OCMock/OCMExceptionReturnValueProvider.m index d63cd285..bd1e4add 100644 --- a/Source/OCMock/OCMExceptionReturnValueProvider.m +++ b/Source/OCMock/OCMExceptionReturnValueProvider.m @@ -27,4 +27,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation [[NSException exceptionWithName:OCMStubbedException reason:@"Exception stubbed in test." userInfo:@{ @"exception": returnValue }] raise]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]: Throws `%@`", [self class], self, returnValue]; +} + @end diff --git a/Source/OCMock/OCMIndirectReturnValueProvider.m b/Source/OCMock/OCMIndirectReturnValueProvider.m index a74e7294..f9cee094 100644 --- a/Source/OCMock/OCMIndirectReturnValueProvider.m +++ b/Source/OCMock/OCMIndirectReturnValueProvider.m @@ -49,4 +49,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation [anInvocation setSelector:originalSelector]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]: Calls `%@` on `%@`", [self class], self, NSStringFromSelector(selector), provider]; +} + @end diff --git a/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m b/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m index 7278ff4a..b6dfbfcc 100644 --- a/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m +++ b/Source/OCMock/OCMNonRetainingObjectReturnValueProvider.m @@ -53,5 +53,10 @@ - (void)handleInvocation:(NSInvocation *)anInvocation } [anInvocation setReturnValue:&returnValue]; } + +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]: Returns `%@`", [self class], self, returnValue]; +} @end diff --git a/Source/OCMock/OCMNotificationPoster.m b/Source/OCMock/OCMNotificationPoster.m index 766476f3..0d6d690e 100644 --- a/Source/OCMock/OCMNotificationPoster.m +++ b/Source/OCMock/OCMNotificationPoster.m @@ -40,5 +40,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation [[NSNotificationCenter defaultCenter] postNotification:notification]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]: Posts `%@`", [self class], self, notification]; +} @end diff --git a/Source/OCMock/OCMRealObjectForwarder.m b/Source/OCMock/OCMRealObjectForwarder.m index 8f5a643d..7f09108f 100644 --- a/Source/OCMock/OCMRealObjectForwarder.m +++ b/Source/OCMock/OCMRealObjectForwarder.m @@ -44,5 +44,9 @@ - (void)handleInvocation:(NSInvocation *)anInvocation [anInvocation invoke]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"[%@ - %p]", [self class], self]; +} @end