aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-06-24 17:33:07 -0400
committerGitHub <noreply@github.com>2017-06-24 17:33:07 -0400
commit98d12f1ef31014287c897fc60df4e1af70781ca3 (patch)
tree3cfceae220ee6201dc009af02917571c1235e7f4 /actionpack/lib/action_dispatch
parent8cad811b0559661df3c58528ac1e8d5a2e601d4d (diff)
parenteba361824d9eb242f186bb711ef82381ac50ef9e (diff)
downloadrails-98d12f1ef31014287c897fc60df4e1af70781ca3.tar.gz
rails-98d12f1ef31014287c897fc60df4e1af70781ca3.tar.bz2
rails-98d12f1ef31014287c897fc60df4e1af70781ca3.zip
Merge pull request #29561 from samphippen/samphippen/add-option-to-silence-puma-in-system-test
Add an option to silence puma in system tests.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/system_testing/server.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/server.rb b/actionpack/lib/action_dispatch/system_testing/server.rb
index 4a214ef713..89ca6944d9 100644
--- a/actionpack/lib/action_dispatch/system_testing/server.rb
+++ b/actionpack/lib/action_dispatch/system_testing/server.rb
@@ -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