jnicklas/capybara — pull request #660 by raggi (2012-03-06 21:48:17+00:00)
Title: Bubble up errors that aren't handled by applications/frameworks

Currently, people do things like make servers puts or use Thread.abort_on_exception = true to do this. That leads to other problems, so I added some code to cache the errors and re-raise in the testing thread.

In general this will display errors that are released / uncaught by frameworks (e.g. rails in test mode). Sometimes, where the first request doesn't error, but subsequent asset / ajax type requests do, it will raise those errors instead. Whilst this may be slightly odd, it will help with having a faster feedback loop most of the time.

Ideally it wouldn't rely on driver.rack_server. I'd actually prefer that session handled server booting when drivers request servers, however, this would be a larger refactor that is not appropriate for rolling up into these changes.