Sha256: d8180ef79dcc9ec824f79a070f2ce00f23ba18475f320cf7c72f1d52d403f50f
Contents?: true
Size: 676 Bytes
Versions: 9
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true # rubocop:todo all require 'lite_spec_helper' describe Mongo::Id do it 'starts with ID 1' do class IdA include Mongo::Id end expect(IdA.next_id).to eq(1) end it 'increases each subsequent ID' do class IdB include Mongo::Id end expect(IdB.next_id).to eq(1) expect(IdB.next_id).to eq(2) end it 'correctly generates independent IDs for separate classes' do class IdC include Mongo::Id end class IdD include Mongo::Id end expect(IdC.next_id).to eq(1) expect(IdD.next_id).to eq(1) expect(IdC.next_id).to eq(2) expect(IdD.next_id).to eq(2) end end
Version data entries
9 entries across 9 versions & 2 rubygems