erikdoe / ocmock

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

Clean up descriptions #393

Closed dmaclach closed 4 years ago

dmaclach commented 4 years ago

Make descriptions match the object type they are describing.

Descriptions previously often had a bad class name.

imhuntingwabbits commented 4 years ago

This could use more tests (ideally one for each concrete subclass of OCMockObject). If this format is worth requiring (it seems like it) it's worth a meta test that validates all concrete subclasses follow this format with their descriptions.

dmaclach commented 4 years ago

Added tests, and also added naming. Found the naming to be really useful when you have multiple mocks of the same type.

erikdoe commented 4 years ago

Can you please split this into two PRs? This is not just cleaning up some descriptions. It also adds a feature to give a name to an instance of a mock object, a name that is then returned in description.

Could you also clarify what exactly you mean by "Descriptions previously often had a bad class name."?

dmaclach commented 4 years ago

Remove the naming for now, and focused on just reporting the class type as opposed to the more generic OCMockObject.