aboutsummaryrefslogtreecommitdiffstats
path: root/actionsystemtest/lib/action_system_test
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2017-02-18 09:40:20 -0500
committereileencodes <eileencodes@gmail.com>2017-02-20 15:07:35 -0500
commit0a683085b1db435b7371350b2799a0f248cd717a (patch)
treee00b1507de3169038c036716145d6d4d9b00ff33 /actionsystemtest/lib/action_system_test
parent893c3b6282bc87c1f07a1f4084de8ff6709917b1 (diff)
downloadrails-0a683085b1db435b7371350b2799a0f248cd717a.tar.gz
rails-0a683085b1db435b7371350b2799a0f248cd717a.tar.bz2
rails-0a683085b1db435b7371350b2799a0f248cd717a.zip
Rename server and remove optional port setting
I've renamed the server to `rails_puma` so that it doesn't override Capybara's default puma server. I've also removed the hard port setting. Users can simply use `Capybara.server_port` writer to set the port if they require that.
Diffstat (limited to 'actionsystemtest/lib/action_system_test')
-rw-r--r--actionsystemtest/lib/action_system_test/server.rb19
1 files changed, 3 insertions, 16 deletions
diff --git a/actionsystemtest/lib/action_system_test/server.rb b/actionsystemtest/lib/action_system_test/server.rb
index 6f87b2767d..76ae30f753 100644
--- a/actionsystemtest/lib/action_system_test/server.rb
+++ b/actionsystemtest/lib/action_system_test/server.rb
@@ -2,10 +2,6 @@ require "rack/handler/puma"
module ActionSystemTest
class Server # :nodoc:
- def initialize(port)
- @port = port
- end
-
def run
register
setup
@@ -13,22 +9,13 @@ module ActionSystemTest
private
def register
- Capybara.register_server :puma do |app, host|
- Rack::Handler::Puma.run(app, Port: @port, Threads: "0:1")
+ 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 = :puma
- end
-
- def set_port
- Capybara.server_port = @port
+ Capybara.server = :rails_puma
end
end
end