Clean up junk from previous tests when running new tests

This commit is contained in:
Kyle Drake 2017-03-30 15:40:36 -07:00
parent 29a6e95a2a
commit 26a53995db

View file

@ -63,3 +63,10 @@ I18n.enforce_available_locales = true
Mail.defaults do
delivery_method :test
end
# Clean up junk from tests
[Site::SITE_FILES_ROOT, Site::SCREENSHOTS_ROOT, Site::THUMBNAILS_ROOT].each do |p|
FileUtils.mkdir_p p
FileUtils.rm_rf File.join(p, '*')
File.write File.join(p, '.gitignore'), '*'
end