Sha256: 7b967c63d31c8f9a762c0c60719d7498a9f02e1e54efeaf3e9fb74f6eceb3d27
Contents?: true
Size: 636 Bytes
Versions: 2
Compression:
Stored size: 636 Bytes
Contents
require_relative '../spec_helper' 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kamerling-0.0.2 | spec/kamerling/uuid_spec.rb |
kamerling-0.0.1 | spec/kamerling/uuid_spec.rb |