Sha256: 4c87c58090799bc4d875f6896db523f7caa87548eec9c663de5a5e2c85c27f93
Contents?: true
Size: 693 Bytes
Versions: 153
Compression:
Stored size: 693 Bytes
Contents
require "spec_helper" require "shelly/download_progress_bar" describe Shelly::DownloadProgressBar do before do $stderr.stub(:print) @bar = Shelly::DownloadProgressBar.new(4444) end it "should inherith from ProgressBar" do @bar.should be_kind_of(ProgressBar) end it "should initialize parent with header and given size" do @bar.title.should == "Progress" @bar.total.should == 4444 end describe "#progress_callback" do it "should return callback for updating progress bar" do @bar.should_receive(:inc).with(10) @bar.should_receive(:inc).with(20) @bar.progress_callback.call(10) @bar.progress_callback.call(20) end end end
Version data entries
153 entries across 153 versions & 1 rubygems