title: How to skip SSL certificate verification with Capybara
body: <p>I'm trying to test a webapp that is served over HTTPS, but I'm not able to skip certificate verification:</p>
  
  <pre><code>#!/usr/bin/env ruby
  require "rubygems"
  require "bundler/setup"
  require "capybara"
  require "capybara/dsl"
  require "capybara-webkit"
  
  Capybara.run_server = false
  Capybara.register_driver :webkit do |app|
    Capybara::Driver::Webkit.new(app, :ignore_ssl_errors =&gt; true)
  end
  Capybara.current_driver = :webkit
  Capybara.app_host = "https://foo.bar.com"
  
  module Test
    class Net
  include Capybara::DSL
  
  def get_results
    visit('/index.jsp')
    fill_in "#UserId", :with =&gt; "sheldon"
    fill_in "#Pwd", :with =&gt; "cooper"
    click_button "Enter"
  
    page.save_screenshot('screenshot.png')
  end
    end
  end
  
  spider = Test::Net.new
  spider.get_results
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>net.rb:10:in `initialize': wrong number of arguments (2 for 0) (ArgumentError)
      from net.rb:10:in `new'
      from net.rb:10:in `block in &lt;main&gt;'
      from /usr/local/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/session.rb:69:in `call'
      from /usr/local/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/session.rb:69:in `driver'
      from /usr/local/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/session.rb:197:in `visit'
      from /usr/local/lib/ruby/gems/2.0.0/gems/capybara-2.2.0/lib/capybara/dsl.rb:51:in `block (2 levels) in &lt;module:DSL&gt;'
      from net.rb:20:in `get_results'
      from net.rb:31:in `&lt;main&gt;'
  </code></pre>
  
  <p>How can I skip it?</p>