Permalink
Browse files

Merge pull request #29561 from samphippen/samphippen/add-option-to-si…

…lence-puma-in-system-test

Add an option to silence puma in system tests.
  • Loading branch information...
2 parents 8cad811 + eba3618 commit 98d12f1ef31014287c897fc60df4e1af70781ca3 @sgrif sgrif committed on GitHub Jun 24, 2017
Showing with 12 additions and 1 deletion.
  1. +12 −1 actionpack/lib/action_dispatch/system_testing/server.rb
@@ -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

0 comments on commit 98d12f1

Please sign in to comment.