[[theBlock(^{ ... }) should] change:^{ return (NSInteger)count; }]
[[theBlock(^{ ... }) should] change:^{ return (NSInteger)count; } by:+1]
[[theBlock(^{ ... }) should] change:^{ return (NSInteger)count; } by:-1]
Example:
[[theBlock(^{
[array addObject:@"foo"];
}) should] change:^{ return (NSInteger)[array count]; } by:+1];
[[theBlock(^{
[array addObject:@"bar"];
[array removeObject:@"foo"];
}) shouldNot] change:^{ return (NSInteger)[array count]; }];
[[theBlock(^{
[array removeObject:@"bar"];
}) should] change:^{ return (NSInteger)[array count]; } by:-1];