lib/watirspec/html_formatter.rb in watirspec-0.1.4 vs lib/watirspec/html_formatter.rb in watirspec-0.1.5

- old
+ new

@@ -25,15 +25,16 @@ archive_dir = File.join(@output_dir, "../archive") FileUtils.mkdir_p(archive_dir) unless File.exists?(archive_dir) FileUtils.mv @output_dir, File.join(archive_dir, "#{File.basename(@output_dir)}_#{File.mtime(@output_dir).strftime("%y%m%d_%H%M%S")}") end FileUtils.mkdir_p(@files_dir) + @files_saved_during_example = [] super end def example_started(example) # :nodoc: - @files_saved_during_example = [] + @files_saved_during_example.clear super end def extra_failure_content(failure) # :nodoc: save_javascript_error @@ -105,8 +106,8 @@ basename = File.basename(file_name, extension) file_path = File.join(@files_dir, "#{basename}_#{Time.now.strftime("%H%M%S")}_#{example_group_number}_#{example_number}#{extension}") @files_saved_during_example.unshift(:desc => description, :path => file_path) file_path end - + end end \ No newline at end of file