Sha256: f5c1124aed9d411704803aec1cd14f6abd564d8ce6cd9b66c10319be674afb17
Contents?: true
Size: 462 Bytes
Versions: 1
Compression:
Stored size: 462 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe TTY::ProgressBar, '.new' do let(:output) { StringIO.new('', 'w+') } it "displays bytes processed" do progress = described_class.new(":byte", output: output, total: 102_400) 5.times { progress.advance(20_480) } output.rewind expect(output.read).to eq([ "\e[1G20.00KB", "\e[1G40.00KB", "\e[1G60.00KB", "\e[1G80.00KB", "\e[1G100.00KB\n" ].join) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tty-progressbar-0.3.0 | spec/unit/formatter/byte_spec.rb |