@@ -208,8 +208,12 @@ @implementation OCTestManagedObject
208
208
209
209
@end
210
210
211
+
212
+
211
213
@implementation OCMockObjectPartialMocksTests
212
214
215
+ #pragma mark Test for description
216
+
213
217
- (void )testDescription
214
218
{
215
219
TestClassWithSimpleMethod *object = [[TestClassWithSimpleMethod alloc ] init ];
@@ -318,7 +322,7 @@ - (void)testRefusesToCreateTwoPartialMocksForTheSameObject
318
322
319
323
- (void )testRefusesToCreatePartialMockForTollFreeBridgedClasses
320
324
{
321
- id object = ( id ) CFBridgingRelease (CFStringCreateWithCString (kCFAllocatorDefault , " foo" , kCFStringEncodingASCII ));
325
+ id object = CFBridgingRelease (CFStringCreateWithCString (kCFAllocatorDefault , " foo" , kCFStringEncodingASCII ));
322
326
XCTAssertThrowsSpecificNamed ([OCMockObject partialMockForObject: object],
323
327
NSException ,
324
328
NSInvalidArgumentException ,
@@ -507,15 +511,12 @@ - (void)testPartialMockOnKVOObserved
507
511
KVO notifications stop functioning. If we did not do this, the presence of the mock
508
512
subclass would cause KVO to crash, at least without further tinkering. */
509
513
[realObject setMethodInt: 45 ];
510
- // STAssertEquals(numKVOCallbacks, 1, @"did not get subclass KVO notification");
511
514
XCTAssertEqual (numKVOCallbacks, 0 , @" got subclass KVO notification" );
512
515
[mock setMethodInt: 47 ];
513
- // STAssertEquals(numKVOCallbacks, 2, @"did not get mock KVO notification");
514
516
XCTAssertEqual (numKVOCallbacks, 0 , @" got mock KVO notification" );
515
517
516
518
[mock stopMocking ];
517
519
XCTAssertEqualObjects ([realObject class ], origClass, @" Classes different after stopMocking" );
518
- // STAssertEqualObjects(object_getClass(realObject), kvoClass, @"KVO class different after stopMocking");
519
520
XCTAssertEqualObjects (object_getClass (realObject), origClass, @" class different after stopMocking" );
520
521
521
522
[realObject removeObserver: self forKeyPath: @" methodInt" context: MyContext];
0 commit comments