From 18df595ebd2fce93ba8c015a3d544a3dc88b1928 Mon Sep 17 00:00:00 2001 From: Jan Grodowski Date: Tue, 3 Dec 2024 22:43:21 +0100 Subject: [PATCH] Rubocop fixes --- lib/undercover/result.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/undercover/result.rb b/lib/undercover/result.rb index 121239e..fa236ca 100644 --- a/lib/undercover/result.rb +++ b/lib/undercover/result.rb @@ -88,14 +88,14 @@ def pretty_print if line.strip.empty? Rainbow(formatted_line).darkgray.dark elsif covered.nil? - Rainbow(formatted_line).darkgray.dark + \ + Rainbow(formatted_line).darkgray.dark + Rainbow(' hits: n/a').italic.darkgray.dark elsif covered.positive? - Rainbow(formatted_line).green + \ + Rainbow(formatted_line).green + Rainbow(" hits: #{covered}").italic.darkgray.dark + \ count_covered_branches(num) elsif covered.zero? - Rainbow(formatted_line).red + \ + Rainbow(formatted_line).red + Rainbow(" hits: #{covered}").italic.darkgray.dark + \ count_covered_branches(num) end @@ -123,7 +123,7 @@ def count_covered_branches(line_number) return '' if branches.empty? if count_covered < branches.size - Rainbow(' branches: ').italic.darkgray.dark + \ + Rainbow(' branches: ').italic.darkgray.dark + Rainbow("#{count_covered}/#{branches.size}").italic.red else Rainbow(" branches: #{count_covered}/#{branches.size}").italic.darkgray.dark