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

2

6

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?

Alcatraz answered 3/1, 2011 at 15:5 Comment(0)
F
0

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

Fauteuil answered 12/4, 2011 at 17:55 Comment(1)
just including the thin server gem gem "thin" in Gemfile also did.Alcatraz
A
6

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
Anciently answered 21/10, 2016 at 3:1 Comment(2)
Works a treat. After registering as above, I also had to set the server; Capybara.server = :unicorn.Supranational
I also had to add rack-handlers to my Gemfile, and do require "rack/handler/unicorn" before the code in this answer, or I would get "uninitialized constant Rack::Handler::Unicorn (NameError)". I'm on Rack 2.0.5.Expanded
F
0

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

Fauteuil answered 12/4, 2011 at 17:55 Comment(1)
just including the thin server gem gem "thin" in Gemfile also did.Alcatraz

© 2022 - 2024 — McMap. All rights reserved.