In using capybara and selenium to run integration tests in rails, if an exception is raised a blank white page is shown instead of the usual exception screen with the stack trace. Is there a way to get capybara to show the stack trace pages?
I was not able to get the stack traces to show with Webrick or Thin, but my eventual workaround was to use Mongrel, which properly prints the stack traces to stderr.
With capybara 0.4.1.2 or later, you can configure capybara to use mongrel like so:
Capybara.server do |app, port|
require 'rack/handler/mongrel'
Rack::Handler::Mongrel.run(app, :Port => port)
end
Matt's solution didn't work for me, but precisely this gist https://gist.github.com/1443408 did.
https://github.com/thoughtbot/capybara-webkit/issues/226 explains in more detail why it happens and provides explanation on what given gist does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With