我正在使用 KIWI 测试我的 iOS 应用程序。我想问一下如何检查UIViewController中是否存在元素,但是,我在实现文件中声明了元素,而不是在头文件中。
那可能吗?
#import "Kiwi.h"
SPEC_BEGIN(HomeViewController)
describe(@"HomeViewController", ^{
context(@"when instantiated", ^{
__block HomeViewController *controller = nil;
beforeEach(^{
controller = [[HomeViewController alloc] init];
});
it(@"it should have been instantiated", ^{
[controller shouldNotBeNil];
});
it(@"it should have UITableViewController", ^{
/*
WHAT TO DO HERE
*/
})
});
});
SPEC_END