debian-mirror-gitlab/features/support/db_cleaner.rb
2018-03-17 18:26:18 +05:30

11 lines
204 B
Ruby

require 'database_cleaner'
DatabaseCleaner[:active_record].strategy = :deletion
Spinach.hooks.before_scenario do
DatabaseCleaner.start
end
Spinach.hooks.after_scenario do
DatabaseCleaner.clean
end