debian-mirror-gitlab/features/support/db_cleaner.rb

12 lines
206 B
Ruby
Raw Normal View History

2015-09-11 14:41:01 +05:30
require 'database_cleaner'
2016-11-03 12:29:30 +05:30
DatabaseCleaner[:active_record].strategy = :truncation
2015-09-11 14:41:01 +05:30
Spinach.hooks.before_scenario do
DatabaseCleaner.start
end
Spinach.hooks.after_scenario do
DatabaseCleaner.clean
end