WebMock causes `Async::HTTP::Client#endpoint` to always be `nil`
Closed this issue · 0 comments
postmodern commented
I noticed in my specs that once webmock/rspec
is loaded, lib/webmock/http_lib_adapters/async_http_client_adapter.rb
will detect Async::HTTP
and override Async::HTTP::Client
with Async::HTTP::WebMockClientWrapper
which inherits from Async::HTTP::Client
, *butdoes not call
superin
initializenor does it set
@endpoint.
Async::HTTP::Clientappears to only create it's persistent connection upon first request, so calling
super()in
Async::HTTP::WebMockClientWrapper#initialize` should be safe.