Sha256: 4fc2659ce6cb9b5f2bb53315f60f9c321c4c8df07a6906f5c1564aa7fe5c564e
Contents?: true
Size: 436 Bytes
Versions: 9
Compression:
Stored size: 436 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe TTY::ProgressBar, 'percent' do let(:output) { StringIO.new('', 'w+') } it "displays percent finished" do progress = TTY::ProgressBar.new(":percent", output: output, total: 5) 5.times { progress.advance } output.rewind expect(output.read).to eq([ "\e[1G20%", "\e[1G40%", "\e[1G60%", "\e[1G80%", "\e[1G100%\n" ].join) end end
Version data entries
9 entries across 9 versions & 1 rubygems