I want to do something like this:
stubRequest("GET", "http://localhost:8000/api/foo").andReturn(401)
stubRequest("GET", "http://localhost:8000/api/foo").andReturn(200)
let result = service.myServiceCall()
XCTAssertEqual(result, "My Result")
... so that the first call to /api/foo
in my test gets a 401 response and the second call gets a 200. Is this possible with Nocilla?
Note that both these calls happen inside myServiceCall()
so I can't reset the Nocilla stubs in the middle.