From 78500c8cdfe7bf94fa13c353533de0518c97215d Mon Sep 17 00:00:00 2001 From: Konrad Date: Fri, 13 Sep 2024 16:27:17 +0200 Subject: [PATCH] style: extract content of visual report to the constant to fix the "Block has too many lines. [39/25]" violation --- spec/visual_report_helper.rb | 80 ++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/spec/visual_report_helper.rb b/spec/visual_report_helper.rb index e77fa86..faf2b8f 100644 --- a/spec/visual_report_helper.rb +++ b/spec/visual_report_helper.rb @@ -1,6 +1,46 @@ # frozen_string_literal: true module VisualReportHelper + VISUAL_REPORT_TEMPLATE = <<-HTML + + + + Morandi report + + + + + + + + + + + + + + +
DescriptionImage
+ + + + HTML + class << self attr_accessor :group end @@ -13,45 +53,7 @@ def visual_report_path def create_visual_report File.open(visual_report_path, 'w') do |fp| - fp << <<-HTML - - - - Morandi report - - - - - - - - - - - - - - -
DescriptionImage
- - - - HTML + fp << VISUAL_REPORT_TEMPLATE end end