I have a project that is mixed Obj-C and Swift and I am having some issues getting my unit tests to work.
I'm using the @testable import moduleName
directive to import my files, however it does not appear to be importing all the files. I have full access to pretty much all of my Obj-C models, manager classes etc. but none of the view controllers (95% of which are in Obj-C) are available from within the XCTestCase
, along with all of my Swift files.
I have imported @testable import ModuleName
at the top of the XCTestCase,
I have also edited the target to enable testability, but the only way I can access these files seems to be if I set the files target membership manually, which if I have understood everything correctly, I should not need to do.
Any suggestions?