You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a very similar problem to #68 - I'm using partial mocks of NSManagedObjects to test my core data models.
At some places, I'm using real NSManagedObjects and that works great, at others I need to mock certain methods that produce computed values out of the model data, because they depend on a deep hierarchy of related NSManagedObjects.
When I mock these methods however, properties of these objects cannot be used anymore because there seems to be no way at the moment to mock them or set them.
What do you think about optionally having "nice" partial mocks, which behave just like the real objects except for the methods that have been mocked via andReturnValue:?
The text was updated successfully, but these errors were encountered:
Not sure I understand. Partial mocks do behave like the real object for all methods that aren't stubbed. Line 217 in the current implementation of OCPartialMockObject: if the invocation is not "recorded", which is OCMock's internal lingo for saying it's not stubbed, then it is forwarded to the real object. My assumption is that you mean something different, especially because you reference an issue with key-value lookups. Can you clarify?
I'm having a very similar problem to #68 - I'm using partial mocks of NSManagedObjects to test my core data models.
At some places, I'm using real NSManagedObjects and that works great, at others I need to mock certain methods that produce computed values out of the model data, because they depend on a deep hierarchy of related NSManagedObjects.
When I mock these methods however, properties of these objects cannot be used anymore because there seems to be no way at the moment to mock them or set them.
What do you think about optionally having "nice" partial mocks, which behave just like the real objects except for the methods that have been mocked via
andReturnValue:
?The text was updated successfully, but these errors were encountered: