erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

issue 339 workaround #354

Closed Applitom closed 6 years ago

Applitom commented 6 years ago

issue #339 workaround

erikdoe commented 6 years ago

As far as I can tell this PR based on the proposal you made in November. At the time I had posted a comment explaining that I don't understand this change. As far as I read it the change you propose would only affect class methods on subclasses of NSManagedObject. The fix I added a should already cover handling of subclasses of NSManagedObject, just not class methods on those. That's the theory. Hence I had asked whether you could add a test case that fails without your change but passes with it. Or am I missing something?

Applitom commented 6 years ago

Hello, I'm sorry about the late response (better late than never 😄). I made a little example of the crash, I hope it explains our problem better. You can find it here: https://github.com/Applitom/ocmock-issue339-fix

Thanks!

erikdoe commented 6 years ago

I've added a slightly different fix for this. Please see #339. It would be great of you could confirm that my fix works for you in the thread over there.