Sha256: 10c74bcf7dc8eff24c50736ab79cbabe1d6903c6eb85a9bc0e02be615d64f6a5
Contents?: true
Size: 418 Bytes
Versions: 3
Compression:
Stored size: 418 Bytes
Contents
require "spec_helper" describe Agent::UUID do it "should generate a uuid" do Agent::UUID.generate.should 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 } uuids.size.should == uuids.uniq.size end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
agent-0.10.0 | spec/uuid_spec.rb |
agent-0.9.1 | spec/uuid_spec.rb |
agent-0.9.0 | spec/uuid_spec.rb |