1

In order to get NTLM working with Webmock + net_http, I need the net_http_connect_on_start option enabled. For example, in the console, or the beginning of a spec, I can use:

WebMock.allow_net_connect! net_http_connect_on_start: true

but VCR configuration only allows

config.allow_http_connections_when_no_cassette = true

To get my test specs working, I do a monkey page on WebMock:

module WebMock
  class Config
    def net_http_connect_on_start
      true
    end
  end
end

I'd like to be able to configure VCR to pass that option instead of a monkey patch.

I dug around the VCR code, but couldn't find anywhere to modify it and submit a pull request.

Is this an issue with VCR, or am I missing something?

pduey
  • 3,706
  • 2
  • 23
  • 31

1 Answers1

0

I know this question is old but I worked around this via:

VCR.configure do |config|
  config.before_http_request(:real?) do
    WebMock.allow_net_connect!(net_http_connect_on_start: true)
  end
end
Paul Sturgess
  • 3,254
  • 2
  • 23
  • 22