Gemfile

group :development, :test do
  gem 'sqlite3'
  gem 'rspec-rails', '2.13.1'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
end

> bundle install
> rails generate rspec:install

spec/spec_helper.rb

RSpec.configure do |config|
  config.include Capybara::DSL
end

Note: this is different than plan rspec gem. It’s an rspec gem specially designed for rails that creates it’s own spec_helper.