Created
September 17, 2015 07:42
-
-
Save yuroyoro/9abff96857508d990c9c to your computer and use it in GitHub Desktop.
Capybara 2.0でunicornを使うためのworkarround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capybara.server do |app, port| | |
Unicorn::Configurator::RACKUP[:port] = port | |
Unicorn::Configurator::RACKUP[:set_listener] = true | |
server = Unicorn::HttpServer.new(app, worker_processes: 2) | |
at_exit do | |
server.stop(false) | |
end | |
server.start | |
Thread.stop | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment