I hope this question is seen and answered by someone from the Realm team
I have a project that uses Cedar to write BDD style tests. I have a mixed project with Objective C and Swift files. Some of these swift files are for custom Realm models. I use CocoaPods to install Realm to my project.
The recommended settings that I've seen so far are the following:
- Use
Realm/Headers
in Podfile for Test targets and justRealm
for main target - this solves the+[RLMObjectBase ignoredProperties]: unrecognized selector sent to class
error.
My app builds and runs but now I get this RLMObject subclasses with the same name cannot be included twice in the same target
If I remove the swift objects from all of my test targets and leave them only on the main one, now I can't see them inside test files, which leads me to the next point
- Use @testable in your swift files. That's a good advice if you're testing with a swift XCTest class, but it doesn't work with Cedar (or I don't know how to make it work)
So my question would be, is there any way I could make this setup work? What would be the exact steps?