If your website runs under ssl than your integration tests should too. This post outlines how to set up testing over https with capybara 2.1 and a few popular capybara drivers. The majority of this info was borrowed from this capybara github issue.
In order to run your capybara test server under ssl, you will need to generate a self signed certificate.
You'll want to check the certificate and private key into your project. I added them to my spec/support directory.
Now that the certificate is all set, start capybara with ssl enabled using your certificates. Hint: If you are using rspec, the following snippets can be pasted into your spec_helper.rb.
Next tell capybara, to make requests using https:
Now you'll need to instruct your web driver to automatically accepted your self signed certificate even though you are running from localhost.
Finally, add the following monkey patch capybara to make http with ssl enabled:
I am not proud of the last step, and jnicklas indicated in this closed issue that this should not be needed, but not sure how else to get it done. Plan on following up with him and updating the post.