Closed pikaboo closed 7 years ago
How does this even happen?
Here is code to reproduce:
_scriptManager = OCMPartialMock([ScriptsManager manager]); OCMStub([_scriptManager cachedData]).andReturn(nilValue()); id expected = nilValue(); id actual = [_scriptManager cachedData]; assertThat(actual, equalTo(expected));
code from the library:
- (BOOL)matches:(id)item { if (item == nil) return self.expectedValue == nil; return [item isEqual:self.expectedValue]; }
item == nil returns false
please see stackoverflow post below.
http://stackoverflow.com/a/5914886/2136812
What is the question? Is there an OCMockito issue?
The question is: why is nil != nil ?
Your example shows OCMock, not OCMockito. Do you have an OCMockito question?
How does this even happen?
Here is code to reproduce:
code from the library:
item == nil returns false
please see stackoverflow post below.
http://stackoverflow.com/a/5914886/2136812