Update rubocop-rails to version 2.24.1

This commit is contained in:
Henne Vogelsang 2024-04-16 13:27:34 +02:00
parent 75bd3184cd
commit 10f8c46119
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
2 changed files with 5 additions and 3 deletions

View file

@ -7,13 +7,15 @@ RSpec.configure do |config|
example_filename = File.expand_path(example_filename, Capybara.save_path)
example_screenshotname = "#{example_filename}.png"
example_filename += '.html'
# rubocop:disable Lint/Debugger
if RSpec.current_example.exception.present?
save_page(example_filename)
save_screenshot(example_screenshotname) # rubocop:disable Lint/Debugger
save_screenshot(example_screenshotname)
# remove the file if the test starts working again
else
File.unlink(example_filename) if File.exist?(example_filename)
File.unlink(example_screenshotname) if File.exist?(example_screenshotname)
end
# rubocop:enable Lint/Debugger
end
end