BigW Consortium Gitlab

db_cleaner.rb 190 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
require 'database_cleaner'

DatabaseCleaner.strategy = :truncation

Spinach.hooks.before_scenario do
  DatabaseCleaner.start
end

Spinach.hooks.after_scenario do
  DatabaseCleaner.clean
end