diff --git a/lib/mutant/reporter/cli.rb b/lib/mutant/reporter/cli.rb index cd6e7b46..fe6d9be5 100644 --- a/lib/mutant/reporter/cli.rb +++ b/lib/mutant/reporter/cli.rb @@ -4,6 +4,7 @@ module Mutant class CLI < self include Concord.new(:output) + NL = "\n".freeze CLEAR_PREV_LINE = "\e[1A\e[2K".freeze # Output abstraction to decouple tty? from buffer @@ -112,7 +113,7 @@ module Mutant # def swap(frame) output.write(frame) - @last_length = frame.lines.length + @last_length = frame.split(NL).length end # Call block throttled diff --git a/lib/mutant/reporter/cli/printer.rb b/lib/mutant/reporter/cli/printer.rb index c77d9929..1ebc2655 100644 --- a/lib/mutant/reporter/cli/printer.rb +++ b/lib/mutant/reporter/cli/printer.rb @@ -5,8 +5,6 @@ module Mutant class Printer include AbstractType, Delegator, Adamantium::Flat, Concord.new(:output, :object) - NL = "\n".freeze - # Run printer on object to output # # @param [IO] output