Skip to content

Commit

Permalink
style: fix minor violations in visual report helper
Browse files Browse the repository at this point in the history
  • Loading branch information
knarewski committed Sep 13, 2024
1 parent 78500c8 commit 105c556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/visual_report_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -75,7 +75,7 @@ def add_to_visual_report(example, files)
fp << %(<div class="img-block"><img src="#{base}" style="max-width: 300px; height: auto;"><br>)
type, width, height = GdkPixbuf::Pixbuf.get_file_info(filename)
fp << "w: #{width}, h: #{height}, t: #{type&.name},<br>" \
"f: #{File.basename(filename)}, s: #{File.size(filename)}</div>"
"f: #{File.basename(filename)}, s: #{File.size(filename)}</div>"
end
fp.puts %(</td></tr>)
VisualReportHelper.group = group
Expand Down

0 comments on commit 105c556

Please sign in to comment.