Sha256: 2df7b8de71fd4c7d99c4bbeb509c1f17675772bd4574299ded3a520e91a7f5ab
Contents?: true
Size: 427 Bytes
Versions: 2
Compression:
Stored size: 427 Bytes
Contents
require "spec_helper" describe Agent::UUID do it "should generate a uuid" do expect(Agent::UUID.generate).to match(/^[0-9a-f]{8}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{4}_[0-9a-f]{12}$/) end it "should generate unique IDs across the BLOCK_SIZE boundary" do upper_bound = Agent::UUID::BLOCK_SIZE * 2 + 10 uuids = (1..upper_bound).map{ Agent::UUID.generate } expect(uuids.size).to eq(uuids.uniq.size) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
agent-0.12.0 | spec/uuid_spec.rb |
agent-0.11.0 | spec/uuid_spec.rb |