LoginSignup
2
2

More than 5 years have passed since last update.

GHUnitの導入について

Last updated at Posted at 2013-01-03

事前にしておくこと

  • GHUnitIOS.frameworkの取得
git clone https://github.com/gabriel/gh-unit.git
cd gh-unit/Project-iOS
make

手順

  • 新規プロジェクトをEmpty applicationで作成

  • Add Target新しくhoge(仮称)のターゲットを追加

  • 追加したターゲットのBuild Settingの項目にあるOther Linker Flags-ObjC -all_loadを追加

  • FrameworksにGHUnitIOS.frameworkを追加する。その際、ターゲットにはhogeにチェックを入れる
    ※ DirPath : gh-unit/Project-iOS/build/Framework

  • Empty applicationでプロジェクトを作成するとQuatzCore.frameworkが無いので、これも追加する

  • 追加したターゲットに存在する、AppDelegate.h/mmain.mを削除

  • その代わりに、GHUnitIOSTestMain.mを追加
    ※ DirPath : gh-unit/Tests

  • 実行のターゲットをhogeにして実行。この時、シュミレータ上にRunのボタンがあれば環境の構築は完了。

参考にした情報

GHUnitとOCMockでUnit Test効率化

Undefined symbol for architecture i386 compile error caused by CACurrentMediaTime()

GHUnitで単体テストをしてみよう

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2