Sha256: 8f60502858b2978546a191d0c7ab6ea1656eedea4f78ab0b776aec591e2418de

Contents?: true

Size: 333 Bytes

Versions: 3

Compression:

Stored size: 333 Bytes

Contents

require 'stringio'
require 'ansi/progressbar'

class TC_ANSI_Progressbar < KO::TestCase

  test "progressbar" do
    stio = StringIO.new
    pbar = ANSI::Progressbar.new("Test Bar", 10, stio) do |b|
      b.style(:title => [:red], :bar=>[:blue])
    end
    10.times do |i|
      sleep 0.1
      pbar.inc
    end
    true
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ansi-1.2.5 test/case_progressbar.rb
ansi-1.2.4 test/case_progressbar.rb
ansi-1.2.3 test/case_progressbar.rb