Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?

More than 5 years have passed since last update.

@shiratsu

Kiwiを試す

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
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
1
Help us understand the problem. What is going on with this article?