Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (25 sloc) 0.817 kb
require 'helper'
describe "SimpleUUID::UUID.to_store" do
it "returns value if value is already uuid" do
uuid = SimpleUUID::UUID.new
SimpleUUID::UUID.to_store(uuid).should be(uuid)
end
it "converts value to uuid if not already uuid" do
uuid = SimpleUUID::UUID.new
[uuid.to_guid, uuid.to_s, uuid.to_i].each do |value|
SimpleUUID::UUID.from_store(value).should eq(uuid)
end
end
end
describe "SimpleUUID::UUID.from_store" do
it "returns value if value is already uuid" do
uuid = SimpleUUID::UUID.new
SimpleUUID::UUID.from_store(uuid).should be(uuid)
end
it "converts value to uuid if not already uuid" do
uuid = SimpleUUID::UUID.new
[uuid.to_guid, uuid.to_s, uuid.to_i].each do |value|
SimpleUUID::UUID.from_store(value).should eq(uuid)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.