Sha256: ce0b29d6c08e590552476cbb7a21874881068732880080111452df9cccf83e91
Contents?: true
Size: 720 Bytes
Versions: 1
Compression:
Stored size: 720 Bytes
Contents
require_relative '../spec_helper' require_relative '../../lib/kamerling/uuid' module Kamerling describe UUID do describe '.[]' do it 'creates a normal UUID representation from binary data' do uuid = '31364220-7072-6f6a-6563-742055554944' UUID['16B project UUID'].must_equal uuid end end describe '.bin' do it 'returns the binary representation of an UUID' do UUID.bin('31364220-7072-6f6a-6563-742055554944') .must_equal '16B project UUID' end end describe '.new' do it 'creates a new random UUID' do UUID.new.must_match(/\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/) UUID.new.wont_equal UUID.new end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kamerling-0.0.3 | spec/kamerling/uuid_spec.rb |