What is the `__identify__` route that Capybara looks for?

Viewed 1128

When I disable Webmock or VCR I get the following error in my Rspec tests. Apparently it's looking for an /__identify__ route.

          WebMock::NetConnectNotAllowedError:
        Real HTTP connections are disabled. Unregistered request: GET http://127.0.0.1:51768/__identify__ with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}

A bit of googling shows that this is something specific to Capybara, but I wasn't able to find out what exactly it's trying to do and why it might need to be stubbed.

Thanks!

2 Answers

For VCR you can configure this way:


VCR.configure do |config|
  // more VCR configs here

  config.ignore_request do |request|
    URI(request.uri).host == "127.0.0.1"
  end
end
Related