Sha256: f098fc6ed3c742b41b79b84cf620d430c5d68cfd10b2266d2e88b3f0e6c7b10e

Contents?: true

Size: 441 Bytes

Versions: 6

Compression:

Stored size: 441 Bytes

Contents

RSpec.describe TTY::ProgressBar, ':total_byte token' do
  let(:output) { StringIO.new('', 'w+') }

  it "displays bytes total" do
    progress = described_class.new(":total_byte", output: output, total: 102_400)
    5.times { progress.advance(20_480) }
    output.rewind
    expect(output.read).to eq([
      "\e[1G100.00KB",
      "\e[1G100.00KB",
      "\e[1G100.00KB",
      "\e[1G100.00KB",
      "\e[1G100.00KB\n"
    ].join)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tty-progressbar-0.17.0 spec/unit/formatter/total_byte_spec.rb
tty-progressbar-0.16.0 spec/unit/formatter/total_byte_spec.rb
tty-progressbar-0.15.1 spec/unit/formatter/total_byte_spec.rb
tty-progressbar-0.15.0 spec/unit/formatter/total_byte_spec.rb
tty-progressbar-0.14.0 spec/unit/formatter/total_byte_spec.rb
tty-progressbar-0.13.0 spec/unit/formatter/total_byte_spec.rb