Class: Capybara::Mechanize::Driver

Inherits:
RackTest::Driver
  • Object
show all
Defined in:
lib/capybara/mechanize/driver.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Driver

Returns a new instance of Driver.

Raises:

  • (ArgumentError)


5
6
7
8
9
# File 'lib/capybara/mechanize/driver.rb', line 5

def initialize(app, options = {})
  raise ArgumentError, "mechanize requires a rack application, but none was given" unless app

  super
end

Instance Method Details

#browserObject



15
16
17
# File 'lib/capybara/mechanize/driver.rb', line 15

def browser
  @browser ||= Capybara::Mechanize::Browser.new(self)
end

#remote?(url) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/capybara/mechanize/driver.rb', line 11

def remote?(url)
  browser.remote?(url)
end