Sha256: 16c3be43a69cd81528dd03c175ac708b9e4feb8a05005450c2db669f955e6de4
Contents?: true
Size: 723 Bytes
Versions: 21
Compression:
Stored size: 723 Bytes
Contents
require 'spec_helper' describe Docker::MessagesStack do describe '#append' do context 'without limits' do |variable| it 'does not limit stack size by default' do data = ['foo', 'bar'] msg = Docker::Messages.new(data, [], data) expect(subject.messages).not_to receive(:shift) 1000.times { subject.append(msg) } end end context 'with size limit' do let(:subject) { described_class.new(100) } it 'limits stack to given size' do data = ['foo', 'bar'] msg = Docker::Messages.new(data, [], data) expect(subject.messages).to receive(:shift).exactly(1900).times 1000.times { subject.append(msg) } end end end end
Version data entries
21 entries across 21 versions & 1 rubygems