Dawson
Dawson

Reputation: 4403

How do I test categories using Kiwi

I am having problems when using Kiwi to test a dynamically linked framework. The issue is that my objects do not respond to selectors of the functions defined in categories in my dynamically linked framework.

I initially thought that this was a problem with my build settings so I created a fresh project here : https://github.com/dreid93/TestingFrameworkCategory

In this project I have created a category called GenericCategory and have written three tests. One in Objective-C using XCTest, one in Swift using XCTest and the final in Objective-C using Kiwi. The XCTest tests are passing while the Kiwi test is failing.

I have added the -all_load and -ObjC flags to the Other Linker Flags in the build settings of the test target and this did not resolve the problem.

I have also taken a look at the following article though it did not offer any solutions : http://adoptioncurve.net/archives/2012/09/test-driven-development-of-an-objective-c-category-with-kiwi/

Thanks in advance for any and all help.

Upvotes: 3

Views: 99

Answers (0)

Related Questions