class Capybara::Config

def default_driver

Returns:
  • (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 && @deprecation_notified[method]
  @deprecation_notified[method] = true
end

def initialize

def initialize
  @session_options = Capybara::SessionConfig.new
  @javascript_driver = nil
end

def javascript_driver

Returns:
  • (Symbol) - The name of the driver used when JavaScript is needed
def javascript_driver
  @javascript_driver || :selenium
end

def server=(name)

Other tags:
    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 name.respond_to? :call
    name
  elsif 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)
  raise 'Threadsafe setting cannot be changed once a session is created' if (bool != threadsafe) && Session.instance_created?
  @threadsafe = bool
end