OCMockitoSwift
OCMockitoSwift copied to clipboard
Add caller's filename and line number to the fail report
Hey, Aleksander!
I've added file name and line number to the fail report of the test.
Now it prints the actual line number, where the verify(mock) ...
function is called, i.e.
failed: caught "HCGenericTestFailure", "/path/to/MyTests.swift:123: matcher error: Wanted but not invoked:
myMethod:ANYTHING withArguments:ANYTHING
Before the changes it used to always print OCMockitoSwiftAdapter.m:67
where the verifyCount()
call is used to be.
Please, take a look, and merge it if you like.
I've run all the tests in the example before and after the changes. All passed.
Thanks! 😊