1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00
Commit graph

21 commits

Author SHA1 Message Date
Thomas Walpole
ed295f25bd Update to modern RSpec 2017-02-06 10:56:58 -08:00
Joe Ferris
753348ecb4 Extract class for booting the server
The Connection class is fairly large and combines the responsibilities
of booting the server and connecting to it.

This extracts a class to encapsulate booting a server. It also provides
a hook for injecting your own server.
2016-04-07 13:10:20 -04:00
nritholtz
8d665b04f4 Fix spec sleep race condition
This spec was randomly failing because it would sometimes take longer
than the fixed, 1-second sleep we had in place. This changes it to wait
up to 3 seconds, without sleeping longer than it needs to.
2015-04-10 13:14:07 -04:00
Matthew Horan
144a43ff7b Raise better errors if server fails to start
* When WEBKIT_SERVER_START_TIMEOUT was reached, @port would get set to
  nil. If execution of the SERVER_PROCESS returned immediately, @port
  would get set to 0. This lead to odd cross-platform behavior in
  #connect, which would try to connect to a nonsense port.
2014-07-13 14:35:05 -04:00
Matthew Horan
ae862d695b Simplify shutdown logic for Connection
* Use a QSocketNotifier listening to stdin to determine when the parent
  process has detached.
2014-07-02 12:14:16 -04:00
Matthew Horan
729c2cf364 Fix Connection stderr redirect spec under Qt 5.3
* qDebug behavior has changed in Qt 5.3:
  https://codereview.qt-project.org/#/c/69731/
2014-06-30 20:40:51 -04:00
Alex Kwiatkowski
5dd835e4ca This fixes a stderr redirection test on fast machines. The write pipe was
getting closed before the redirection thread had a chance to copy it's
contents into it.
2014-02-13 18:36:03 -05:00
Matthew Horan
d787215939 Use a pipe to test stderr forwarding
* Assertion was accidentally removed when testing #read as an
  alternative.
2014-01-28 22:01:58 -05:00
Matthew Horan
3f3ad93888 Read the expected number of bytes from StringIO
* Instead of sleep, use blocking #read to determine if the expected
  message is logged.
* Fixes failure 2 from #615.
2014-01-28 20:03:09 -05:00
Jon Rowe
7e3df143ed using stub to create test doubles is deprecated, use double directly 2013-08-11 17:51:38 +01:00
Jon Rowe
e0565fb5d2 switch from == to eq to remove warnings 2013-08-11 15:40:25 +01:00
Matthew Horan
a70b7c4aa1 Deprecate the stdout option for Connection 2013-02-06 20:16:51 -05:00
Matthew Horan
9bb7b93be3 Don't forward stderr to nil
Fixes #455.
2013-02-04 19:53:32 -05:00
Matthew Horan
ea06a1b57f Forward stderr from server to stderr, drop stdout
We don't actually write anything to stdout. Also rename the stdout
option to stderr, since that's where we forward the output.
2013-02-04 19:53:32 -05:00
Matthew Horan
2ceab4e525 Forward stderr via Open3#popen3
Forwarding stderr via 2>&1 causes an additional child process to be
spawned.  Killing that process does not kill webkit_server.

JavaScipt console messages and alerts are now written to the logger
instead of directly to stdout.
2012-11-30 21:38:56 -05:00
Matthew Horan
61a6561d62 Session is responsible for starting server 2012-11-30 21:38:55 -05:00
Matthew Horan
e80a9c8b92 Pass fully qualified constants to #setsockopt
Fixes #396.
2012-11-22 22:03:01 -05:00
Joe Ferris
215e244f79 Fix tests and remove 'kind_of?' 2012-08-10 13:30:34 -04:00
Benjamin R. Haskell
943db0475e Set TCP_NODELAY option on the TCPSocket
* Fixes slowness issues on Linux
2012-08-10 13:11:42 -04:00
Joe Ferris
259a38f206 Follow new capybara driver naming/module conventions 2012-07-08 12:31:18 -07:00
Joe Ferris
665e0fc729 Extract a Connection class for booting the server 2012-05-04 16:00:25 -04:00