我很困惑为什么这不起作用......
[[[myObject stub] andReturnValue:@YES] isBadical];
NSLog(@"================> result: %i", [myObject isBadical]);
[[[myObject stub] andReturnValue:@NO] isBadical];
NSLog(@"================> new result: %i", [myObject isBadical]);
结果是:
2013-10-13 20:24:49.156 myApp[43197:c07] ================> result: 1
2013-10-13 20:24:49.157 myApp[43197:c07] ================> new result: 1
有没有办法更新存根值而不必停止模拟和/或创建新的模拟对象?