1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/spec/support/database_cleaner.rb
2015-05-05 03:10:25 +02:00

18 lines
403 B
Ruby

RSpec.configure do |config|
config.before(:suite) do
# The :transaction strategy prevents :after_commit hooks from running
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
# load seeds only for test
load "#{Rails.root}/db/test_seeds.rb"
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end