class Capybara::Config
def default_driver
-
(Symbol)
- The name of the driver to use by default
def default_driver @default_driver || :rack_test end
def deprecate(method, alternate_method, once = false)
def deprecate(method, alternate_method, once = false) @deprecation_notified ||= {} warn "DEPRECATED: ##{method} is deprecated, please use ##{alternate_method} instead" unless once and @deprecation_notified[method] @deprecation_notified[method] = true end
def initialize
def initialize @session_options = Capybara::SessionConfig.new end
def javascript_driver
-
(Symbol)
- The name of the driver used when JavaScript is needed
def javascript_driver @javascript_driver || :selenium end
def server=(name)
- See: register_server -
Parameters:
-
options
(Hash
) -- Options to pass to the server block -
name
(Symbol
) -- Name of the server type to use -
name
(Symbol
) -- Name of the server type to use
Overloads:
-
server=([name, options])
-
server=(name)
def server=(name) name, options = *name if name.is_a? Array @server = if options proc { |app, port, host| Capybara.servers[name.to_sym].call(app, port, host, options) } else Capybara.servers[name.to_sym] end end
def threadsafe=(bool)
def threadsafe=(bool) warn "Capybara.threadsafe == true is a BETA feature and may change in future minor versions" if bool raise "Threadsafe setting cannot be changed once a session is created" if (bool != threadsafe) && Session.instance_created? @threadsafe = bool end