mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
commit
98d12f1ef3
1 changed files with 12 additions and 1 deletions
|
@ -3,6 +3,12 @@ require "rack/handler/puma"
|
|||
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 @@ module ActionDispatch
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue