aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/secure_random_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-10-04 21:10:36 +0200
committerMichael Koziarski <michael@koziarski.com>2008-10-04 21:11:30 +0200
commit1dfebd4f0d25ecf50ba4e320234523d9ee3f7523 (patch)
tree56edc41aa201b47804cb1eebd34f2636e79bbd8f /activesupport/test/secure_random_test.rb
parent923eb9569c2289581d6a48dbd4447202a5ac93d8 (diff)
downloadrails-1dfebd4f0d25ecf50ba4e320234523d9ee3f7523.tar.gz
rails-1dfebd4f0d25ecf50ba4e320234523d9ee3f7523.tar.bz2
rails-1dfebd4f0d25ecf50ba4e320234523d9ee3f7523.zip
1.8 compatibility for random_number method on SecureRandom.
1.9 has its own version.
Diffstat (limited to 'activesupport/test/secure_random_test.rb')
-rw-r--r--activesupport/test/secure_random_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/secure_random_test.rb b/activesupport/test/secure_random_test.rb
index b0b6c21a81..44694cd811 100644
--- a/activesupport/test/secure_random_test.rb
+++ b/activesupport/test/secure_random_test.rb
@@ -12,4 +12,8 @@ class SecureRandomTest < Test::Unit::TestCase
b2 = ActiveSupport::SecureRandom.hex(64)
assert_not_equal b1, b2
end
+
+ def test_random_number
+ assert ActiveSupport::SecureRandom.random_number(5000) < 5000
+ end
end