I am using UIAlertView+Blocks from https://github.com/ryanmaxwell/UIAlertView-Blocks, which adds a tapBlock property to UIAlertView, with OCMock.
id mockView = [OCMockObject mockForClass:[UIAlertView class]];
[[[mockView stub] andReturn:mockView] alloc];
// this works
[[mockView expect] setTapBlock:OCMOCK_ANY];
// this doesn't, it doesn't know what tapBlock is
[[mockResetPasswordView expect] tapBlock:OCMOCK_ANY];
The tapBlock is declared as @property (copy, nonatomic) UIAlertViewCompletionBlock tapBlock
. I also would like to expect this to be called and delegate back to the original method.