Merge pull request #29561 from samphippen/samphippen/add-option-to-silence-puma-in-system-test

Add an option to silence puma in system tests.
This commit is contained in:
Sean Griffin 2017-06-24 17:33:07 -04:00 committed by GitHub
commit 98d12f1ef3

@ -3,6 +3,12 @@
module ActionDispatch
module SystemTesting
class Server # :nodoc:
class << self
attr_accessor :silence_puma
end
self.silence_puma = false
def run
register
setup
@ -11,7 +17,12 @@ def run
private
def register
Capybara.register_server :rails_puma do |app, port, host|
Rack::Handler::Puma.run(app, Port: port, Threads: "0:1")
Rack::Handler::Puma.run(
app,
Port: port,
Threads: "0:1",
Silent: self.class.silence_puma
)
end
end