Sha256: 610a8e5e7916953b7908b7d33adfe2061068f2d9442a7a8b295f1fff3ddbcece
Contents?: true
Size: 674 Bytes
Versions: 18
Compression:
Stored size: 674 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 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
18 entries across 18 versions & 1 rubygems