BigW Consortium Gitlab

db_cleaner.rb 206 Bytes
Newer Older
1 2
require 'database_cleaner'

Connor Shea committed
3
DatabaseCleaner[:active_record].strategy = :truncation
4 5 6 7 8 9 10 11

Spinach.hooks.before_scenario do
  DatabaseCleaner.start
end

Spinach.hooks.after_scenario do
  DatabaseCleaner.clean
end