出于某种原因,我的测试每次都通过了。即使我添加
fail(@"failed");
Xcode 仍然显示“测试成功”
有任何想法吗?
这是我的规格的样子
#import "SDRViewController.h"
#import <UIKit/UIKit.h>
#import <Kiwi/Kiwi.h>
SPEC_BEGIN(SDRViewControllerSpec)
describe(@"SDRViewController", ^{
__block SDRViewController *viewController = [[SDRViewController alloc]init];
beforeAll(^{
[viewController setupCollectionView];
});
describe(@"viewController.collectionView", ^{
describe(@"collectionViewLayout", ^{
UICollectionViewFlowLayout *flowLayout = (UICollectionViewFlowLayout *)viewController.collectionView.collectionViewLayout;
[[flowLayout shouldNot]beNil];
[[theValue(flowLayout.sectionInset) should]equal: theValue(UIEdgeInsetsZero)];
fail(@"failed");
});
});
});
SPEC_END