Elegant way to configure rspec and capybara

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
end

Is there a better way to say to rspec to use capybara?
[]'s

On Aug 21, 2010, at 11:37 AM, narwen wrote:

require ‘capybara’
require ‘capybara/dsl’
require ‘capybara/rails’

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

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

In beta 20 you’ll just need to add it to your Gemfile.

See Issues · rspec/rspec-rails · GitHub