Sha256: 69fcc3fdcf44d1e5a9c9a59566d5b90133031ec3a17409eb68f6bbac317cc131

Contents?: true

Size: 404 Bytes

Versions: 6

Compression:

Stored size: 404 Bytes

Contents

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

  it "stops all bars when top level stops" do
    bars = TTY::ProgressBar::Multi.new("main [:bar]", output: output)

    bar1 = bars.register("[:bar]", total: 5)
    bar2 = bars.register("[:bar]", total: 10)

    bars.stop

    expect(bar1.stopped?).to eq(true)
    expect(bar2.stopped?).to eq(true)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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