?????????????????????????????Given..When..Then??????????????
????Given a team?? when newly created?? it should have a name?? and should have 11 players
?????????????У????????????£??????д?????????????????????????????Kiwi????????????????????????????????????????????????????Kiwi???ɡ?
??????????????Kiwi
?????????????????????CocoaPods?????????CocoaPods????????????????????????????????CocoaPods???顣Xcode 5??XCTest?????£??????????Podfile?????????????????????y?VVStackTests???????????????????target?????????
????target :VVStackTests?? :exclusive => true do
????pod 'Kiwi/XCTest'
????end
???????pod install??????????xcworkspace?????Kiwi?????????????????????????????????????????????????????????repo??????????а??Kiwi??Xcode Template?????????????CocoaPods??????????????????Kiwi?????????ο????wiki??
?????????????Specs??????????Expectations????Kiwi??????????
??????????????????Kiwi????ɡ?????????Kiwi??Template??????????????????Kiwi/Kiwi Spec?????????Specs??????SimpleString???????????target?????????target????彫??????????????????????Spec???????????????????????Tests????????????????к??????????????Kiwi?У??????????????????????????????????????Spec??????????????????????????????????????????Spec???????????????Xcode 5?н?????????????????????.h???????????????????а????ж????.h???????????????????????????????а??Kiwi??Template???????????????????????Objective-C test case class??????????滻???????????
????#import <Kiwi/Kiwi.h>
????SPEC_BEGIN(SimpleStringSpec)
????describe(@"SimpleString"?? ^{
????});
????SPEC_END
?????????????????objc??????????????Щ????????????????????SPEC_BEGIN??SPEC_END?????????????????KWSpec?????????????е?????????????????У?????????????????????????????????????????Щ?????????????????п?????????????????SPEC_BEGIN??SPEC_END?????????滻???

 

describe(@"SimpleString"?? ^{
context(@"when assigned to 'Hello world'"?? ^{
NSString *greeting = @"Hello world";
it(@"should exist"?? ^{
[[greeting shouldNot] beNil];
});
it(@"should equal to 'Hello world'"?? ^{
[[greeting should] equal:@"Hello world"];
});
});
});

????describe?????????????????????????????????е?Given??context???????????????????????????When?????У???it?е?????????壬???????????????????????????????????????Kiwi?????е???????????????????nest?????????Spec????п?????????describe?????????????????????????????????????????????????describe??????????context?????????????????μ?????????context??????????it??????????????????????????????????????
????VVStack[36517:70b] + 'SimpleString?? when assigned to 'Hello world'?? should exist' [PASSED]
????VVStack[36517:70b] + 'SimpleString?? when assigned to 'Hello world'?? should equal to 'Hello world'' [PASSED]
??????????????????????????????????????????δ?????????γ????????????????????????????????Kiwi?????Щ??????????????????????б??????????
????beforeAll(aBlock) - ???scope????????е?????block?????????????
????afterAll(aBlock) - ???scope????????е?????block?????????????
????beforeEach(aBlock) - ??scope??????it????????Σ?????context????????????д??????
????afterEach(aBlock) - ??scope??????it????????Σ?????????????????
????specify(aBlock) - ???????????????д??????????????
????pending(aString?? aBlock) - ???????log??????????????????????????????棬?????????????????д??????????δ?????????????
????xit(aString?? aBlock) - ??pending??????????д????????????????????????????x?????it??????pending???????????????????pending
???????????????????context????????????????????????????????????????????????????????????????before??after????????????????????????
???????????д??it??????????????????(Expectations)????????????????????????????е???????????е???????????????????????????Kiwi??????????should????shouldNot??????????????????ж??????????????????????be????haveSomeCondition?????????????????????????????????should not be nil??should equal????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????IDE??????????????????????????????????????????????????б??????ο???????????檔??????????????????KWMatcher????????????????????????????????????????????????????Kiwi???????????????????п?????????????
????????????????????????????
????Kiwi?????????
??????????????Kiwi?????????VVStack???????????ɡ???????д???XCTest???????????????VVStackSpec???Kiwi????????????????describe????????????