gitlab-org--gitlab-foss/features/support/db_cleaner.rb
2016-10-14 14:26:12 +02:00

11 lines
206 B
Ruby

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