LoginSignup
1
1

More than 5 years have passed since last update.

Kiwiを試す

Last updated at Posted at 2014-03-18

cocoapodsをインストールする

gem install cocoapods

Inside the project’s directory, generate the pod file:

pod init

まずは、xcodeで何かしらプロジェクトを作る
その後、プロジェクトフォルダの直下に移動し

以下ファイルを作成

server:プロジェクト名 shiratsu$ cat Podfile
platform :ios, '7.0'

# Add Kiwi as an exclusive dependency for the AmazingAppTests target
target :プロジェクト名Tests, :exclusive => true do
   pod 'Kiwi'
end

# If you're using Xcode 5 with a brand new project
# (XCTest based instead of OCUnit based) use this instead:
target :プロジェクト名Tests, :exclusive => true do
   pod 'Kiwi/XCTest'
end
pod install

を実行

open プロジェクト名.xcworkspace

これで,kiwiが使えるようになってます

テストケース

#import <XCTest/XCTest.h>
#import "Kiwi.h"

SPEC_BEGIN(MathSpec)

describe(@"Math", ^{
    it(@"この計算式は合っておる", ^{
        NSUInteger a = 16;
        NSUInteger b = 26;
        [[theValue(a + b) should] equal:theValue(42)];
    });
});

SPEC_END

1
1
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
1
1