# Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require 'rspec/rails' require 'rspec/autorun' require 'database_cleaner' require 'factory_girl_rails' RSpec.configure do |config| config.use_transactional_fixtures = false config.before(:suite) do DatabaseCleaner.strategy = :transaction end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end config.include FactoryGirl::Syntax::Methods end