Skip to content

Instantly share code, notes, and snippets.

@ozw-sei
Created June 15, 2014 10:14
Show Gist options
  • Select an option

  • Save ozw-sei/ff5ae871776f4c0ac2ea to your computer and use it in GitHub Desktop.

Select an option

Save ozw-sei/ff5ae871776f4c0ac2ea to your computer and use it in GitHub Desktop.
#import <XCTest/XCTest.h>
#import "Kiwi.h"
#import "Calc.h"
SPEC_BEGIN(SampleKiwiTests)
describe(@"Calc action", ^{
const __block Calc *calc;
beforeAll(^{
calc = [Calc new];
});
it(@"基本的な割り算ができる", ^{
//[[@(40 + 2) should] equal:@42];
KWValue *actual = theValue([calc div:4 num2:2]);
KWValue *expected = theValue(2);
[[actual should] equal:expected];
});
it(@"ゼロで割ったら例外を投げる", ^{
// XCTFail(@"Fail!!")
});
});
SPEC_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment