Capybara + Steak + SSL

I use Steak + Capybara for acceptance tests and ssl stand for SSL, now when I tried to run the test suite, I have an error message

(Error code: ssl_error_rx_record_too_long)

Any idea how to make it work?

+3
source share
1 answer

Capybara launches a simple application server (Mongrel / Webrick) that does not support SSL. To get the SSL environment on your local computer, you need to configure something like nginx or Apache with mod_ssl and mod_proxy to accept SSL connections and proxies for simple HTTP requests to your development server.

Then you can run it in the settings of the test environment and in your tests to go to this SSL server, and not to the application server itself.

:

" ssl", SSL. , . AFAIR Capybara selenium driver Firefox, SSL. , "" .

Capybara , . , - :

Capybara::Server.class_eval do
  def find_available_port
     @port = 3000
  end
end
+1

All Articles