How to run cucumber selenium using Thin server instead of default Webrick?

别来无恙 提交于 2019-12-10 13:11:38

问题


my cucumber features with selenium runs (for Rails 3 app) using the default Webrick server.

How can I force or setup to run with Thin server instead of Webrick? Any settings to put in env.rb file or else?


回答1:


Two ways:

1) turn off capybara's built in server and run it yourself.

2) Looks like someone patched in the capability here https://github.com/jnicklas/capybara/pull/175




回答2:


This is the new way to do this with recent capybara

require "rack/handler/unicorn"
Capybara.register_server(:unicorn) do |app, port, host|
  Rack::Handler::Unicorn.run(app, :Port => port)
end
Capybara.server = :unicorn


来源:https://stackoverflow.com/questions/4585544/how-to-run-cucumber-selenium-using-thin-server-instead-of-default-webrick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!