Sha256: 999430ba705d69ccca902b96d5945d781d93b410a912e04b2be423dd49109423
Contents?: true
Size: 549 Bytes
Versions: 5
Compression:
Stored size: 549 Bytes
Contents
require 'spec_helper' describe ::Trax::Model::UUID do let(:product) { ::Product.create(:name => "iMac") } subject{ product.uuid } its(:record_type) { should eq ::Product } its(:record) { should eq product } describe ".generate" do context "with prefix" do let(:prefixed_uuid) { described_class.generate("1a") } it { prefixed_uuid[0..1].should eq "1a" } end context "without prefix" do let(:unprefixed_uuid) { described_class.generate } it { unprefixed_uuid.length.should eq 36 } end end end
Version data entries
5 entries across 5 versions & 1 rubygems