I am trying to stub the selected property on UIButton
. The getter is defined as:
@property (nonatomic, getter=isSelected) BOOL selected;
My stub looks like this:
[[[button stub] andReturnValue:OCMOCK_VALUE(TRUE)] isSelected];
I receive the following error when I run the test:
Return value does not match method signature; signature declares 'c' but value is 'i'.
I think this is something to do with the getter=isSelected
part but not sure what's going on
Is it possible to stub this type of getter?