From 266794cfe6fefae251ec19397b3f39832817ed5e Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Tue, 18 Aug 2020 21:14:28 +0200 Subject: [PATCH] Purge screenshots before test suite --- test/application_system_test_case.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index dd14066..6b53570 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -17,7 +17,8 @@ class BodyTrackingSystemTestCase < ApplicationSystemTestCase } Capybara.configure do |config| - config.save_path = './tmp/screenshots/' + config.save_path = Rails.root.join('tmp', 'screenshots') + FileUtils.rm Dir.glob(File.join(config.save_path, '*.png')) end fixtures :projects