1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch/system_testing/server.rb
eileencodes fea0c35107 Revert "Merge pull request #28283 from y-yagi/silence_puma_startup_messages_in_system_test"
This reverts commit 0d73f9116c, reversing
changes made to 21ff8a4932.

We don't want to silence Puma because it's start up messages can be
useful (to see threads, port etc). #28109 was instead fixed by not
running system tests by defaul with `bin/rails test` in #28286.
2017-03-05 09:00:32 -05:00

32 lines
600 B
Ruby

require "rack/handler/puma"
module ActionDispatch
module SystemTesting
class Server # :nodoc:
def run
register
setup
end
private
def register
Capybara.register_server :rails_puma do |app, port, host|
Rack::Handler::Puma.run(app, Port: port, Threads: "0:1")
end
end
def setup
set_server
set_port
end
def set_server
Capybara.server = :rails_puma
end
def set_port
Capybara.always_include_port = true
end
end
end
end