Closed apotonick closed 1 month ago
Hi @apotonick that's not currently possible because the test adapter doesn't ship with an underlying http library like the other adapters (e.g. :net_http -> Net::HTTP
).
I'm not sure about what exactly you're trying to achieve here, but if you're writing tests for your application and you want to test some Faraday client you've built, you're almost always better using some other solution than the :test
adapter, like Webmock or VCR, which both allow what you're trying to achieve.
The :test
adapter is mostly there for assisting in the development of Faraday middleware.
Hopefully this helps, but happy to continue the discussion if you have any other inputs 🙂
Hi @iMacTia, wow, that was a fast response, thanks! :green_heart:
Okay, that makes sense, I didn't know that the :test
adapter is more of an internal concept. I will check out webmock and post my findings here! Thanks again :beers:
Hi, first of all thanks for Faraday, I love the gem!
As the title says, is it possible to configure Faraday's
test
adapter in a way that only configured requests return their stub response, and unmatched proceed as real requests?