Ошибка в модульном тесте Kiwi
Я изучаю юнит-тест. Я собираюсь использовать Kiwi
Framework.I написал простой тестовый код с использованием удара киви:
#import <Kiwi/Kiwi.h>
SPEC_BEGIN(SimpleStringSpec)
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"];
});
});
});
SPEC_END
При тестировании кода Project завершится с ошибкой:
12:26:50.842 XCTest_Demo[8053:93923] _XCT_testBundleReadyWithProtocolVersion:minimumVersion: reply received
12:26:50.852 XCTest_Demo[8053:93923] _IDE_startExecutingTestPlanWithProtocolVersion:16
2016-05-25 12:26:50.856 XCTest_Demo[8053:93891] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSInvocation _invocationWithMethodSignature:frame:]: method signature argument cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109a4dd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000107949deb objc_exception_throw + 48
2 CoreFoundation 0x000000010990d71d +[NSInvocation _invocationWithMethodSignature:frame:] + 333
3 XCTest 0x0000000111b38ea9 -[XCTestCase initWithSelector:] + 167
4 XCTest 0x0000000111b38f08 +[XCTestCase testCaseWithSelector:] + 43
5 XCTest 0x0000000111b374cb +[XCTestSuite testSuiteForTestCaseWithName:] + 344
6 XCTest 0x0000000111b38181 -[XCTestSuite _initWithTestConfiguration:] + 508
7 XCTest 0x0000000111b38674 +[XCTestSuite testSuiteForTestConfiguration:] + 50
8 XCTest 0x0000000111b24979 -[XCTestDriver _runSuite] + 233
9 XCTest 0x0000000111b257d1 -[XCTestDriver _checkForTestManager] + 259
10 XCTest 0x0000000111b6fa9a _XCTestMain + 628
11 CoreFoundation 0x00000001099732ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
12 CoreFoundation 0x0000000109968f75 __CFRunLoopDoBlocks + 341
13 CoreFoundation 0x00000001099686d2 __CFRunLoopRun + 850
14 CoreFoundation 0x00000001099680f8 CFRunLoopRunSpecific + 488
15 GraphicsServices 0x000000010b74bad2 GSEventRunModal + 161
16 UIKit 0x0000000107daef09 UIApplicationMain + 171
17 XCTest_Demo 0x0000000107456c5f main + 111
18 libdyld.dylib 0x000000010a6a592d start + 1
19 ??? 0x0000000000000005 0x0 + 5
)
libc++abi.dylib: terminating with uncaught exception of type NSException
В чем дело?