Sha256: cef9ed3738cad464a9dec88a8d1514fa8c200e51b75a804177d055ab74ee8599

Contents?: true

Size: 401 Bytes

Versions: 6

Compression:

Stored size: 401 Bytes

Contents

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

  it 'finishes progress' do
    progress = TTY::ProgressBar.new("[:bar]", output: output, total: 10)
    progress.advance
    progress.finish
    expect(progress.complete?).to be(true)
    output.rewind
    expect(output.read).to eq([
      "\e[1G[=         ]",
      "\e[1G[==========]\n"
    ].join)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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