demarches-normaliennes/spec/support/database_cleaner.rb

18 lines
367 B
Ruby
Raw Normal View History

RSpec.configure do |config|
config.before(:suite) do
2015-08-14 14:05:09 +02:00
DatabaseCleaner.clean_with(:truncation, {:except => %w[evenement_vies formulaires types_piece_jointe]})
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end