reports Method accessibilityLabel was not invoked; but was expected at least once.
This is a very confusing error because it's obviously being called. The problem is that OCMPartialMock does not set itself up to handle any methods implemented by NSObject or NSProxy. All of the accessibility methods are informal protocols (i.e. categories) on NSObject. This can be done by using OCMExpect([mock accessibilityLabel]) and OCMVerifyAll(mock).
reports
Method accessibilityLabel was not invoked; but was expected at least once.
This is a very confusing error because it's obviously being called. The problem is that OCMPartialMock does not set itself up to handle any methods implemented by
NSObject
orNSProxy
. All of the accessibility methods are informal protocols (i.e. categories) onNSObject
. This can be done by usingOCMExpect([mock accessibilityLabel])
andOCMVerifyAll(mock)
.