Sha256: 247aeeb502f3c2f7b77cbc4125846a1f3b0c77bd6d1e0b6fddf0d55c47ae1886

Contents?: true

Size: 383 Bytes

Versions: 8

Compression:

Stored size: 383 Bytes

Contents

# encoding: utf-8

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

  it "displays current value" do
    progress = TTY::ProgressBar.new("|:current|", output: output, total: 10)
    3.times { progress.advance }
    output.rewind
    expect(output.read).to eq([
      "\e[1G|1|",
      "\e[1G|2|",
      "\e[1G|3|"
    ].join)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tty-progressbar-0.12.2 spec/unit/formatter/current_spec.rb
tty-progressbar-0.12.1 spec/unit/formatter/current_spec.rb
tty-progressbar-0.12.0 spec/unit/formatter/current_spec.rb
tty-progressbar-0.11.0 spec/unit/formatter/current_spec.rb
tty-progressbar-0.10.1 spec/unit/formatter/current_spec.rb
tty-progressbar-0.10.0 spec/unit/formatter/current_spec.rb
tty-progressbar-0.9.0 spec/unit/formatter/current_spec.rb
tty-progressbar-0.8.1 spec/unit/formatter/current_spec.rb