CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✓ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Aug 2016 |
Maintained by Gabriel Handford, Felix Schulze.
XCTest instead.GHUnit is a test framework for Mac OS X and iOS. It can be used standalone or with other testing frameworks like SenTestingKit or GTM.
If you need support for asynchronous tests you might want to check out GRUnit which is a recent fork of this project.
$ gem install ghunitThis will edit your ProjectName.xcodeproj file and create a Tests target, scheme, and a sample test file.
$ ghunit install -n ProjectNameCreate a new file named Podfile in the directory that contains the your .xcodeproj file, or edit it if it already exists.
# Podfile
platform :ios, '6.0'
target :Tests do
pod 'GHUnit', '~> 0.5.9'
endInstall your project's pods. CocoaPods will then download and configure the required libraries for your project:
$ pod installNote: If you don't have a Tests target in your project, you will get an error: "[!] Unable to find a target named Tests". If you named your test target something different, such as "ProjectTests" then the Podfile target line should look like: target :ProjectTests do instead.
You should use the .xcworkspace file to work on your project:
$ open ProjectName.xcworkspace$ ghunit install_cli -n ProjectNameInstall ios-sim using homebrew:
$ brew install ios-simNow you can run tests from the command line:
$ ghunit run -n ProjectNameTo generate a test in your test target with name SampleTest:
$ ghunit add -n ProjectName -f SampleTestcd Project-iOS && makeAdd the GHUnitIOS.framework to your project
cd Project-MacOSX && makeAdd the GHUnit.framework to your project