erikdoe / ocmock

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

Better exception when attempting to mock NSObject method with macro. #399

Closed dmaclach closed 4 years ago

dmaclach commented 4 years ago

The exception message provided when attempting to mock an NSObject method (like hash) with a macro is confusing. The updated text is much clearer as to possible causes.

erikdoe commented 4 years ago

Not sure whether you noticed, but I made the corresponding change for the verify macro. Arguably, the fact that this was needed shows that there's some unneccesary duplication in the original code.