Method: Snapshot::Runner#clear_previous_screenshots
- Defined in:
- snapshot/lib/snapshot/runner.rb
#clear_previous_screenshots ⇒ Object
87 88 89 90 91 92 93 94 |
# File 'snapshot/lib/snapshot/runner.rb', line 87 def clear_previous_screenshots UI.important("Clearing previously generated screenshots") path = File.join(Snapshot.config[:output_directory], "*", "*.png") Dir[path].each do |current| UI.verbose("Deleting #{current}") File.delete(current) end end |