mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
18 lines
403 B
Ruby
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
|