Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
example of how to setup headless integration tests for a rack app with rspec, capybara, and capybara-webkit
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public
spec
.rspec
Gemfile
Gemfile.lock
README.md
Rakefile
app.rb

README.md

Integration Testing Setup

This is an example of how to setup headless integration tests for a rack app with rspec, capybara, and capybara-webkit.

Setup

brew install qt  # see capybara-webkit repo for other OS instructions
bundle
rake spec
rake spec:integration

Rake Tasks

  • spec:integration only runs specs in the spec/integration with capybara dsl
  • spec runs all other non-integration specs

Defining Integration Specs

To define a new integration spec, add a spec file to the spec/integration folder. These specs will automatically be tagged with :type => :request and :js => true, and have the Capybara DSL and matchers included.

To see how this is done, check out spec/spec_helper.rb

Something went wrong with that request. Please try again.