2024-04-29 00:17:15 +02:00
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2019-05-29 11:49:11 +02:00
|
|
|
|
describe ProgressReport, lib: true do
|
|
|
|
|
context 'when the count pass above 100%' do
|
|
|
|
|
let(:total) { 2 }
|
|
|
|
|
|
|
|
|
|
subject(:progress) { ProgressReport.new(total) }
|
|
|
|
|
|
|
|
|
|
it 'doesn’t raise errors' do
|
|
|
|
|
expect do
|
|
|
|
|
(total + 2).times { progress.inc }
|
|
|
|
|
progress.finish
|
|
|
|
|
end.not_to raise_error
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|