erikdoe / ocmock

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

Partial mocks use class created by OCClassMock #474

Open dmaclach opened 3 years ago

dmaclach commented 3 years ago

OCClassMock creates a pair of classes, but only uses the meta class. OCPartialClassMock creates another pair of classes, but only uses the actual class.

This change makes OCPartialClassMock use the class that is generated (but unused) by OCClassMock, simplifying the class tree, and removing one class that we don't need to dispose of.

This also fixed up one of the issues with KVO where we were potentially disposing the KVO class and throwing an exception.