Sha256: 37413455753de7446b5b97dc3062f3a7a73d3f2a26e40e7003f9cdfd7bdc6788

Contents?: true

Size: 421 Bytes

Versions: 6

Compression:

Stored size: 421 Bytes

Contents

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

  it "displays bytes total" do
    progress = described_class.new(":total", output: output, total: 102_400)
    5.times { progress.advance(20_480) }
    output.rewind
    expect(output.read).to eq([
      "\e[1G102400",
      "\e[1G102400",
      "\e[1G102400",
      "\e[1G102400",
      "\e[1G102400\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_spec.rb
tty-progressbar-0.16.0 spec/unit/formatter/total_spec.rb
tty-progressbar-0.15.1 spec/unit/formatter/total_spec.rb
tty-progressbar-0.15.0 spec/unit/formatter/total_spec.rb
tty-progressbar-0.14.0 spec/unit/formatter/total_spec.rb
tty-progressbar-0.13.0 spec/unit/formatter/total_spec.rb