Class: Capybara::RackTest::Driver

### Home Classes Methods

### In Files

- lib/capybara/rack_test/driver.rb

### Parent

Capybara::Driver::Base

### Methods

- ::new
- #browser
- #current_url
- #delete
- #dom
- #find_css
- #find_xpath
- #follow
- #follow_redirects?
- #get
- #header
- #html
- #post
- #put
- #redirect_limit
- #request
- #reset!
- #response
- #response_headers
- #status_code
- #submit
- #title
- #visit

### Files

- another_test_file.txt
- test_file.txt

### Class/Module Index

Quicksearch

- Capybara
- Capybara::Ambiguous
- Capybara::CapybaraError
- Capybara::DSL
- Capybara::Driver
- Capybara::Driver::Base
- Capybara::Driver::Node
- Capybara::DriverNotFoundError
- Capybara::ElementNotFound
- Capybara::ExpectationNotMet
- Capybara::Features
- Capybara::FileNotFound
- Capybara::FrozenInTime
- Capybara::Helpers
- Capybara::InfiniteRedirectError
- Capybara::ModalNotFound
- Capybara::Node
- Capybara::Node::Actions
- Capybara::Node::Base
- Capybara::Node::Document
- Capybara::Node::DocumentMatchers
- Capybara::Node::Element
- Capybara::Node::Finders
- Capybara::Node::Matchers
- Capybara::Node::Simple
- Capybara::NotSupportedByDriverError
- Capybara::Queries
- Capybara::Queries::BaseQuery
- Capybara::Queries::TextQuery
- Capybara::Queries::TitleQuery
- Capybara::Query
- Capybara::RSpecMatchers
- Capybara::RSpecMatchers::BecomeClosed
- Capybara::RSpecMatchers::HaveSelector
- Capybara::RSpecMatchers::HaveText
- Capybara::RSpecMatchers::HaveTitle
- Capybara::RSpecMatchers::Matcher
- Capybara::RackTest
- Capybara::RackTest::Browser
- Capybara::RackTest::CSSHandlers
- Capybara::RackTest::Driver
- Capybara::RackTest::Form
- Capybara::RackTest::Form::NilUploadedFile
- Capybara::RackTest::Node
- Capybara::ReadOnlyElementError
- Capybara::Result
- Capybara::ScopeError
- Capybara::Selector
- Capybara::Selector::Filter
- Capybara::Selenium
- Capybara::Selenium::Driver
- Capybara::Selenium::Node
- Capybara::Server
- Capybara::Server::Middleware
- Capybara::Session
- Capybara::SpecHelper
- Capybara::UnselectNotAllowed
- Capybara::Window
- Capybara::WindowError
- TestApp
- TestApp::TestAppError
- Object

No matching classes.

# Capybara::RackTest::Driver

### Constants

DEFAULT_OPTIONS

### Attributes

app[R]
options[R]

### Public Class Methods

new(app, options={}) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 15
    def initialize(app, options={})
      raise ArgumentError, "rack-test requires a rack application, but none was given" unless app
      @app = app
      @options = DEFAULT_OPTIONS.merge(options)
    end

### Public Instance Methods

browser() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 21
    def browser
      @browser ||= Capybara::RackTest::Browser.new(self)
    end

current_url() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 53
    def current_url
      browser.current_url
    end

delete(*args, &block) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 92
    def delete(*args, &block); browser.delete(*args, &block); end

dom() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 77
    def dom
      browser.dom
    end

find_css(selector) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 69
    def find_css(selector)
      browser.find(:css,selector)
    end

find_xpath(selector) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 65
    def find_xpath(selector)
      browser.find(:xpath, selector)
    end

follow(method, path, attributes = {}) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 49
    def follow(method, path, attributes = {})
      browser.follow(method, path, attributes)
    end

follow_redirects?() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 25
    def follow_redirects?
      @options[:follow_redirects]
    end

get(*args, &block) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 89
    def get(*args, &block); browser.get(*args, &block); end

header(key, value) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 93
    def header(key, value); browser.header(key, value); end

html() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 73
    def html
      browser.html
    end

post(*args, &block) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 90
    def post(*args, &block); browser.post(*args, &block); end

put(*args, &block) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 91
    def put(*args, &block); browser.put(*args, &block); end

redirect_limit() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 29
    def redirect_limit
      @options[:redirect_limit]
    end

request() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 37
    def request
      browser.last_request
    end

reset!() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 85
    def reset!
      @browser = nil
    end

response() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 33
    def response
      browser.last_response
    end

response_headers() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 57
    def response_headers
      response.headers
    end

status_code() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 61
    def status_code
      response.status
    end

submit(method, path, attributes) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 45
    def submit(method, path, attributes)
      browser.submit(method, path, attributes)
    end

title() click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 81
    def title
      browser.title
    end

visit(path, attributes = {}) click to toggle source

    # File lib/capybara/rack_test/driver.rb, line 41
    def visit(path, attributes = {})
      browser.visit(path, attributes)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.