[rspec-users] RSpec 2.6 + Capybara 1.0 incompatibility

Kai Schlamp kai.schlamp at googlemail.com
Fri Jun 17 15:20:53 EDT 2011


Here is also the spec helper I use for my integration tests:

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'webrat'
require 'capybara/rspec'
require "database_cleaner"

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
  config.filter_run_excluding :exclude => true
  config.use_transactional_fixtures = false
  config.mock_with :rspec

  config.before(:all) do
    DatabaseCleaner.strategy = :truncation
    DatabaseCleaner.clean
  end

  config.after(:each) do
    DatabaseCleaner.clean
    Sunspot.remove_all!
  end
end

Webrat.configure do |config|
  config.mode = :rails
end


More information about the rspec-users mailing list