Sha256: 8d8fa30bc7a3a6fd0345d2bc20cd08903c695ca99b6edf486ed582919ab00795

Contents?: true

Size: 514 Bytes

Versions: 6

Compression:

Stored size: 514 Bytes

Contents

RSpec.describe TTY::ProgressBar, '#inspect' do
  it "inspects bar properties" do
    bar = described_class.new("downloading [:bar] :total", total: 30)
    expect(bar.inspect).to eq(%q{#<TTY::ProgressBar @format="downloading [:bar] :total", @current="0", @total="30", @width="30", @complete="=", @head="=", @incomplete=" ", @interval="1">})
  end

  it "prints string format" do
    bar = described_class.new("downloading [:bar] :total", total: 30)
    expect(bar.to_s).to eq("downloading [:bar] :total")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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