BigW Consortium Gitlab

db_cleaner.rb 206 Bytes
require 'database_cleaner'

DatabaseCleaner[:active_record].strategy = :truncation

Spinach.hooks.before_scenario do
  DatabaseCleaner.start
end

Spinach.hooks.after_scenario do
  DatabaseCleaner.clean
end