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
This test is being passed multiple times (I'm breaking on firstStubPassingTestForRequest: and foundStub always contains the exact OHHTTPStubsDescriptor I'm expecting); however, the stub response block never gets called.
Here's what I've verified so far, based on reading the Github Issue history of this repo:
setEnabled: gets called with YES, so OHHTTPStubsProtocol gets registered
I'm using AFNetworking 2.0, and NSURLSession is initialized with [NSURLSessionConfiguration defaultSessionConfiguration]
There is only one singleton instance of OHHTTPStubs being used
Does anyone have any idea where I can look next to keep debugging?
The text was updated successfully, but these errors were encountered:
Are you sure OHPathForFileInBundle(@"patient_visit_review.json",nil) return the path where you expect your json file to be, and that this file is correctly included in you test target so is included in your bundle when you build it for the test target?
If you create an OHHTTPStubsResponse with no data that would explain why you never get your response. Did you put a breakpoint in the response block somewhere at least?
@AliSoftware Your suspicious were correct: the file patient_visit_review.json wasn't included in the test target. Thanks for your response, and sorry to waste your time... Hopefully someone in the future will find this thread helpful to make up for that!
Oh, and I almost forgot to thank you for such a wonderful library.
Hi,
Here's my setup for the stubbing:
This test is being passed multiple times (I'm breaking on
firstStubPassingTestForRequest:
andfoundStub
always contains the exactOHHTTPStubsDescriptor
I'm expecting); however, the stub response block never gets called.Here's what I've verified so far, based on reading the Github Issue history of this repo:
setEnabled:
gets called withYES
, soOHHTTPStubsProtocol
gets registeredNSURLSession
is initialized with[NSURLSessionConfiguration defaultSessionConfiguration]
OHHTTPStubs
being usedDoes anyone have any idea where I can look next to keep debugging?
The text was updated successfully, but these errors were encountered: