iosunit-testingkiwi

Forcing failure of a Kiwi test


Is there a way to force failure in a Kiwi test, i.e. the equivalent of XCTFail().

I can write something like

[@"" should] beNil]

that will always fail but I was figuring Kiwi must have something a little more expressive of the developer's intent baked into the framework.


Solution

  • Yep, you can use the fail() macro:

    fail(@"message");