Sha256: 868afb4935c0652cc2eae6bc0421950beb42ba181f670e9eff9edd58878f1fa9

Contents?: true

Size: 385 Bytes

Versions: 1

Compression:

Stored size: 385 Bytes

Contents

require 'cases/helper'

class RandomGenerateTest < ActiveRecord::TestCase
  def test_size_of_generated_string
    assert_equal 16, GoldRecord::UUID.random_generate.size
  end
  
  def test_randomness # This is kind of weak.
    cache = {}
    10000.times do
      value = GoldRecord::UUID.random_generate
      assert !cache.has_key?(value)
      cache[value] = true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gold-record-0.2.0 test/cases/random_generate_test.rb