单元测试Cocoa变得更加容易。专为iOS和OS X应用程序单元测试提供一站式商店。只需一个Pod,一个头文件导入,即可开始。
注意:非常早期的alpha发布。
TPProxy - 记录并忽略所有消息OCUnit便利宏assertTrue(),assertFalse(),assertNil(),assertNotNil()nil-安全相等的宏TPIsEqual(x,y),其中(nil == nil) == YES。UIApplication,UIApplicationDelegate…)NSNotificationCentre+[NSDate date]UIView子类可测试此项目100%适用于通过CocoaPods安装。
为混合iOS/OS X库项目示例在Podfile中的安装
target :MyLibraryOSXTests do
platform :osx
pod 'TestPilot'
end
target :MyLibraryiOSTests do
platform :ios
pod 'TestPilot'
end
将头文件TestPilot.h导入到您的项目中 - 最好导入到您的测试捆绑包.pch文件中,然后开始使用。
使用提供的框架开始测试。
您可能希望在Podfile中添加inhibit_all_warnings!以使构建保持安静。
警告
[!] The target `FooTests [Debug - Release]' overrides the `FRAMEWORK_SEARCH_PATHS' build setting defined in `Pods/Pods-FooTests.xcconfig'.
- Use the `$(inherited)' flag, or
- Remove the build settings from the target.