…d clear up description.
…bara.insert_port_into_portless_url is true.
Thanks to Adam Cigánek for his helpful input and the original patch!
Capybara.timeout sleeps 50ms between polls, and since the server tends to boot quickly, this is a reasonable value. By not adding another 500ms, we shave a few seconds off the test execution time, mostly in spec/server_spec.rb.
This adds a server_host option to Capybara.
In order to run Selenium via Capybara on my virtual machine, you need to be able to bind the server IP to a net interface on the same subnet as the VM. This patch exposes an configuration variable to allow you to bind the test server to any net interface on your local machine. Falls back to 127.0.0.1 if the config var is not set.
…rt| ...} For example, to use mongrel rather than thin or webrick: Capybara.server do |app, port| require 'rack/handler/mongrel' Rack::Handler::Mongrel.run(app, :Port => port) end
Apparently this prevents some issues and has no downsides.
Mongrel is an outdated server, it doesn't work on Ruby 1.9, for speed, thin is perfectly well suited for compatibility webrick is much better. Also: no more annoying logging information from thin/webrick
Reverts the revert. I've added some code to make the Server reuse already booted applications. This reverts commit 9fe037d. Conflicts: lib/capybara/server.rb
This reverts commit a8a4efc.
This protects against the race conditions which inevitably occur when booting multiple capybara servers (such as running specjour). TCPServer.new() will set recently opened sockets to SOCK_WAIT status to ensure that a certain amount of time elapses before they are reused.