Method: Capybara.register_server
- Defined in:
- lib/capybara.rb
.register_server(name) {|app, port, host| ... } ⇒ Object
Register a new server for Capybara.
Capybara.register_server :webrick do |app, port, host|
require 'rack/handler/webrick'
Rack::Handler::WEBrick.run(app, ...)
end
150 151 152 |
# File 'lib/capybara.rb', line 150 def register_server(name, &block) servers.send(:register, name.to_sym, block) end |