iPHone: Unit/Logic Tests initWithNibName
Posted
by pion
on Stack Overflow
See other posts from Stack Overflow
or by pion
Published on 2010-03-31T23:50:18Z
Indexed on
2010/03/31
23:53 UTC
Read the original article
Hit count: 379
iphone
|unit-testing
I have setup my Logic Tests following the instructions on http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html.
I could test a couple classes successfully.
But I got error when testing the following:
- (id)init {
if (self = [super initWithNibName:@"Foo" bundle:nil]) {
...
}
return self;
}
The error message is
-[UIViewController _loadViewFromNibNamed:bundle:] was unable to load a nib named "Foo"
My question:
- Did I do something wrong? Missed something? or
- I cannot test -initWithNibName using Logic Tests technique.
Thanks in advance for your help.
© Stack Overflow or respective owner