-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't call init with data #46
Comments
It's crashing on that 3rd line right? Where is My guess is for some reason that code isn't being included in your test project. Another thing to check - if you just create a regular unit test and write:
Does it crash also? |
Yes crashing on the third line. I am using the same approach in separate unit tests in the same target using: I have tried a number of If possible, could you expand on the sample Objective-C example like the swift example? |
Could you send a full stack trace of the crash? The other thing I was going to suggest was ensuring that the file was added to the target, but looks like you've already verified that. |
Another thing to try (not sure if this will work), when when you get this error: failed: caught "NSInvalidArgumentException", "-[StoriesASDetailViewController initWithStory:]: unrecognized selector sent to instance 0x7fa5fbe07ce0"
and see what it prints out (haven't tried it so don't know if this will work) |
Hey! Really excited to get this project working for me.
I have a number of views and view controllers I would like to test. I am using Realm in-memory to create Realm Objects to pass into my inits to instantiate my views and view controllers.
failed: caught "NSInvalidArgumentException", "-[StoriesASDetailViewController initWithStory:]: unrecognized selector sent to instance 0x7fa5fbe07ce0"
No matter what I try, be it a cell or tableviewcontroller, I just keep getting the error above.
Any advice?
`
+(UIView *)viewForData:(NSDictionary *)data reuseView:(UIView *)reuseView size:(LYTViewSize *)size context:(id _Nullable __autoreleasing *)context {
}
`
The text was updated successfully, but these errors were encountered: