We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
watir-rails will not re-raise exceptions thrown by Rails Rack::App when using Rails 4.x.
watir-rails
Rack::App
Code responsible for this behavior is in Watir::Rails::Middleware#call.
Watir::Rails::Middleware#call
Exceptions won't be even raised when Rails has action_dispatch.show_exceptions set to false and Watir::Rails.ignore_exceptions? is false.
action_dispatch.show_exceptions
false
Watir::Rails.ignore_exceptions?
The problem seems to be in Rails and/or Rack because enabling Thin or WEBrick logging will make everything work.
Rails
Rack
Thin
WEBrick
The following monkey-patch is a temporary solution until newer version of gem has been released.
Add it into your spec_helper.rb or similar file:
spec_helper.rb
require "watir/rails" class Watir::Rails def self.run_default_server(app, port) require 'rack/handler/thin' Rack::Handler::Thin.run(app, :Port => port) rescue LoadError require 'rack/handler/webrick' Rack::Handler::WEBrick.run(app, :Port => port) end end
The text was updated successfully, but these errors were encountered:
PS! The solution above does not seem to work with Thin < 1.6.x
Thin < 1.6.x
Sorry, something went wrong.
Is this still relevant with Rails 5.x?
Or 6.x?
No branches or pull requests
watir-rails
will not re-raise exceptions thrown by RailsRack::App
when using Rails 4.x.Code responsible for this behavior is in
Watir::Rails::Middleware#call
.Exceptions won't be even raised when Rails has
action_dispatch.show_exceptions
set tofalse
andWatir::Rails.ignore_exceptions?
isfalse
.The problem seems to be in
Rails
and/orRack
because enablingThin
orWEBrick
logging will make everything work.The following monkey-patch is a temporary solution until newer version of gem has been released.
Add it into your
spec_helper.rb
or similar file:The text was updated successfully, but these errors were encountered: