spec/mongo/collection_spec.rb in mongo-2.18.1 vs spec/mongo/collection_spec.rb in mongo-2.18.2

- old
+ new

@@ -645,19 +645,29 @@ end context 'when the collection is capped' do let(:collection) do - described_class.new(database, :specs, :capped => true, :size => 1024) + described_class.new(database, :specs, :capped => true, :size => 4096, :max => 512) end + let(:collstats) do + database.read_command(:collstats => :specs).documents.first + end + before do authorized_client[:specs].drop collection.create end it 'returns true' do expect(collection).to be_capped + end + + it "applies the options" do + expect(collstats["capped"]).to be true + expect(collstats["max"]).to eq(512) + expect(collstats["maxSize"]).to eq(4096) end end context 'when the collection is not capped' do