I have an OCUnit Test class: PatientTestViewControllerTests. Below is the interface:
@interface PatientTestViewControllerTests : SenTestCase
@property (nona
The problem is likely that your view controller's .m file is included in both targets, the app and the test bundle. ocunit (and derivatives like Kiwi) uses a test harness that makes the classes included in the app available to tests without having to explicitly include their implementation.
Including both has given you two copies of the same class, which is why they have the same description but different memory addresses.
You generally want isKindOfClass:
and not isMemberOfClass:
. The difference is that isKindOfClass:
will return YES
if the receiver is a member of a subclass of the class in question, whereas isMemberOfClass:
will return NO
in the same case.
You could also directly compare the classes using [self.testController class] == [PatientTestViewController class]
.