gitlab-org--gitlab-foss/features/support/db_cleaner.rb
Robert Speicher 55831a4d50 Move Spinach setup for db_cleaner and capybara to their own files
Also adds capybara-screenshot, which will automatically save the page as
html and an image whenever a feature fails. Handy for debugging.
2015-04-25 21:33:16 -04:00

11 lines
190 B
Ruby

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