Improvements in the DatabaseCleaner

Move all what is related to the DatabaseCleaner to the
database_cleaner.rb file. Load the seeds only when they have been
deleted and not before every test.
This commit is contained in:
Ana María Martínez Gómez 2017-01-10 18:29:25 +01:00
parent 052cfebf4e
commit 7ebf44d1e4
2 changed files with 7 additions and 11 deletions

View file

@ -55,13 +55,6 @@ RSpec.configure do |config|
# --seed 1234
config.order = 'random'
config.around(:each) do |example|
DatabaseCleaner.cleaning do
Rails.application.load_seed
example.run
end
end
# poltergeist as a underlying mech for Capybara
Capybara.javascript_driver = :poltergeist