From c64bb2a6d3dbad02d5548abe9139fed5dadb8fd4 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sun, 28 Jul 2013 19:02:01 +0200 Subject: [PATCH] Fix style issues in Mutant::Reporter* --- lib/mutant/reporter/cli/printer/mutation.rb | 18 +++++++++++------- lib/mutant/reporter/cli/printer/subject.rb | 4 +++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/mutant/reporter/cli/printer/mutation.rb b/lib/mutant/reporter/cli/printer/mutation.rb index dba73fa4..90d2f60d 100644 --- a/lib/mutant/reporter/cli/printer/mutation.rb +++ b/lib/mutant/reporter/cli/printer/mutation.rb @@ -54,12 +54,12 @@ module Mutant # Reporter for noop mutations class Noop < self - MESSAGE = [ - 'Parsed subject AST:', - '%s', - 'Unparsed source:', - '%s', - ].join("\n") + MESSAGE = [ + 'Parsed subject AST:', + '%s', + 'Unparsed source:', + '%s', + ].join("\n") private @@ -70,7 +70,11 @@ module Mutant # @api private # def details - sprintf(MESSAGE, mutation.subject.node.inspect, mutation.original_source) + sprintf( + MESSAGE, + mutation.subject.node.inspect, + mutation.original_source + ) end end # Noop diff --git a/lib/mutant/reporter/cli/printer/subject.rb b/lib/mutant/reporter/cli/printer/subject.rb index c6c7d960..e2360fe1 100644 --- a/lib/mutant/reporter/cli/printer/subject.rb +++ b/lib/mutant/reporter/cli/printer/subject.rb @@ -59,6 +59,8 @@ module Mutant object.subject end + FORMAT = '(%02d/%02d) %3d%% - %0.02fs'.freeze + # Print stats # # @return [undefned @@ -66,7 +68,7 @@ module Mutant # @api private # def print_stats - status('(%02d/%02d) %3d%% - %0.02fs', amount_kills, amount_mutations, coverage, time) + status(FORMAT, amount_kills, amount_mutations, coverage, time) end # Print progress bar finish