Sha256: b0dd2529b32995f86a2ab98ecbf3561f02dddb52b43216ae17b955b688e2d679
Contents?: true
Size: 479 Bytes
Versions: 7
Compression:
Stored size: 479 Bytes
Contents
require 'abstract_unit' class SecureRandomTest < Test::Unit::TestCase def test_random_bytes b1 = ActiveSupport::SecureRandom.random_bytes(64) b2 = ActiveSupport::SecureRandom.random_bytes(64) assert_not_equal b1, b2 end def test_hex b1 = ActiveSupport::SecureRandom.hex(64) b2 = ActiveSupport::SecureRandom.hex(64) assert_not_equal b1, b2 end def test_random_number assert ActiveSupport::SecureRandom.random_number(5000) < 5000 end end
Version data entries
7 entries across 6 versions & 4 rubygems