Skip to content

Instantly share code, notes, and snippets.

@pabuisson
Last active October 16, 2019 06:20
Show Gist options
  • Save pabuisson/9fbdb775de6a9806152db10482375d14 to your computer and use it in GitHub Desktop.
Save pabuisson/9fbdb775de6a9806152db10482375d14 to your computer and use it in GitHub Desktop.
require 'rack/handler/thin'
Capybara.register_server :thin_ssl do |app, port, host|
Rack::Handler::Thin.run(app, Port: port, Host: host) do |server|
server.ssl = true
server.ssl_options = {
private_key_file: "#{Rails.root}/config/ssl/key.pem",
cert_chain_file: "#{Rails.root}/config/ssl/cert.pem",
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment