-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KVC via keyPath is not working with OCMock #152
Comments
This does look suspicious. I'm not sure I completely understand. Could you provide a failing test? |
Please see the referenced commit! Internally |
So, I keep coming back to this issue but I can't seem to find a good answer. My thoughts so far:
For reference, my implementation that "steals" the KV methods from
At this point I feel I'm running out of ideas beyond what we discussed in #68. I'm going to close this issue but feel free to re-open it if you have a new idea. |
I have a object
Controller
that has a property that returns a mock object. I then askController
forvalueForKeyPath:
where the path is a path to the mock object's property. I can see in the debugger thatvalueForKeyPath:
is correctly executed on theController
and that it callsvalueForKey:
on theController
object which returns the mocked object. However, the mocked object never gets a call tovalueForKeyPath:
orvalueForKey:
.This is my mock creation:
The mock is stored in
reservation
. I evaluate a predicate withreservation.reservationMode
on thesut
.I get the following calls:
valueForKeyPath:@"reservation.reservationMode"
valueForKey:@"reservation"
And that's it. If I do not mock the object, the evaluation continues with the following calls on the
Reservation
object.valueForKeyPath:@"reservationMode"
valueForKey:@"reservationMode"
The text was updated successfully, but these errors were encountered: