Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
grodowski committed Dec 3, 2024
1 parent 0acec5e commit 18df595
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/undercover/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 18df595

Please sign in to comment.