[rspec-users] Elegant way to configure rspec and capybara

narwen narwen at gmail.com
Sat Aug 21 11:37:38 EDT 2010

I'm wondering what is the elegant way to say to rspec to use capybara
instead of webrat. Also, I'm not using cucumber.

My project is using:

rails (3.0.0.rc)
rspec (2.0.0.beta.19)
capybara (0.3.9)

I had success creating a file: spec/support/capybara.rb

require 'capybara'
require 'capybara/dsl'
require 'capybara/rails'

RSpec.configure do |config|
  config.include Capybara

Is there a better way to say to rspec to use capybara?

More information about the rspec-users mailing list