From d3f748e11b0dd11a3678aeb45dae8143124653e7 Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Wed, 27 Jun 2012 15:04:36 +0200 Subject: Use when possible a first referential created before the spec transaction --- spec/spec_helper.rb | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ce52830b4..7f465ca11 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,10 +20,9 @@ require 'chouette_factories' Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} require 'will_paginate/array' -require 'database_cleaner' RSpec.configure do |config| - DatabaseCleaner.logger = Rails.logger + # ## Mock Framework # # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: @@ -45,28 +44,4 @@ RSpec.configure do |config| # rspec-rails. config.infer_base_class_for_anonymous_controllers = false - config.before(:suite) do - DatabaseCleaner.strategy = :transaction - - begin - Apartment.database_names.each do |database| - Apartment::Database.drop(database) - end - rescue - # FIXME referentials table not found in jenkins build #13 - end - - DatabaseCleaner.clean_with(:truncation, {:except => %w[spatial_ref_sys geometry_columns]} ) - end - - config.before(:each) do - Apartment::Database.switch(nil) - DatabaseCleaner.start - end - - config.after(:each) do - DatabaseCleaner.clean - Apartment::Database.switch(nil) - end - end -- cgit v1.2.3