diff --git a/spec/visual_report_helper.rb b/spec/visual_report_helper.rb index faf2b8f..8ce1e56 100644 --- a/spec/visual_report_helper.rb +++ b/spec/visual_report_helper.rb @@ -58,7 +58,7 @@ def create_visual_report end def add_to_visual_report(example, files) - lines = IO.readlines(visual_report_path) + lines = File.readlines(visual_report_path) File.open(visual_report_path, 'w') do |fp| lines.each do |line| if line =~ /insert results/ @@ -75,7 +75,7 @@ def add_to_visual_report(example, files) fp << %(

) type, width, height = GdkPixbuf::Pixbuf.get_file_info(filename) fp << "w: #{width}, h: #{height}, t: #{type&.name},
" \ - "f: #{File.basename(filename)}, s: #{File.size(filename)}
" + "f: #{File.basename(filename)}, s: #{File.size(filename)}" end fp.puts %() VisualReportHelper.group = group