Commit Graph

17 Commits

Author SHA1 Message Date
John Wilger 583c54cef5 Server#responsive? now rescues all SystemCallError exceptions
It previously only rescued Errno::ECONNREFUSED and Errno::EBADF. On a
few occasions, I have also seen the Errno::ETIMEDOUT exception raised by
Net::HTTP from this method. Since the Net::HTTP calls are the only thing
in this method that should be making any kind of system calls, a rescue
of all SystemCallError exceptions (the superclass of all of the Errno
exceptions) will catch these as well as any other system call errors
triggered by Net::HTTP.
2013-03-16 13:00:20 -07:00
Jonas Nicklas f6ee775cf0 Fix server spec on Rubinius 2013-02-27 14:05:55 +01:00
Jonas Nicklas 7e4d3b85f5 Use expect..to instead of the `running` alias 2012-10-30 14:26:19 +01:00
Jonas Nicklas 6d68242d1a Allow port to be specified on initialize, closes #685 2012-07-13 15:19:20 +02:00
James Tucker ab62b27ae1 Add code to catch server errors at server boot time, and during responsiveness checks 2012-03-06 14:42:47 -08:00
Jo Liss c444d33631 Remove broken tests for server_boot_timeout
When they were added in 09d6335, responsive? already only hit
/__identify__, which does not hit the server, but gets special-cased in
Capybara's Identify server class (and runs instantly).

So it's not clear what constitutes a "slow" server that might time out
at boot, and thus why server_boot_timeout needs to be configurable. A
server that is slow to respond to HTTP requests would not trigger the
boot timeout. All we really seem to be waiting for within the timeout
window is for Thin or WEBrick to come up.
2012-01-03 21:24:41 +01:00
David Balatero 2dca77060a 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.
2011-10-05 12:09:37 -07:00
Jo Liss b5e89d9a6b Marked tests that do not work and fail intermittently as pending 2011-03-06 01:56:36 +01:00
Jonas Nicklas 99774a136b Make test less hack-ish by using mocks 2010-11-21 18:37:51 +01:00
Adam Cigánek 09d6335986 Server boot timeout is now configurable 2010-11-17 16:51:30 +01:00
Jonas Nicklas 1afc4c6c61 Merge branch 'custom-server-port' of http://github.com/ichverstehe/capybara into ichverstehe-custom-server-port
Conflicts:
	spec/server_spec.rb
2010-09-28 22:37:43 +02:00
Bernerd Schaefer 409c4cdd49 Remove constant redefined warnings in suite 2010-09-17 19:10:16 -05:00
Nicklas Ramhöj 62d17bc377 Whitespace! 2010-09-15 18:19:50 +02:00
ichverstehe 5784f03d6a use Capybara.server_port if specified 2010-09-02 15:03:49 +02:00
Jonas Nicklas 2b6fd77db5 Make sure server does nothing when no app given 2010-03-12 19:14:10 +01:00
Jonas Nicklas b4de9b7015 Fixed failing server spec, server needs to be booted 2010-01-30 20:31:52 +01:00
Jonas Nicklas a996d5eba6 Server is smarter about choosing open port, Closes #4 2009-12-13 14:33:14 +01:00