diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 16:12:46 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-21 16:12:46 +0000 |
commit | 7e66f93db8ff1a26a2c85bfb0242d4e53ea81b6a (patch) | |
tree | 4324a47627dba6650cc4797b9d26969c25f2092c /test/test_securerandom.rb | |
parent | 036083361f3a1d9895c38ab33883d481066822e1 (diff) | |
download | ruby-7e66f93db8ff1a26a2c85bfb0242d4e53ea81b6a.tar.gz |
less random generations in Random::Formatter#choose.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_securerandom.rb')
-rw-r--r-- | test/test_securerandom.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_securerandom.rb b/test/test_securerandom.rb index 9b2c8a5e67..5f08182115 100644 --- a/test/test_securerandom.rb +++ b/test/test_securerandom.rb @@ -144,9 +144,10 @@ end end def test_alphanumeric - 65.times do |idx| - an = @it.alphanumeric - assert_match(/^[0-9a-zA-Z]+$/, an) + 65.times do |n| + an = @it.alphanumeric(n) + assert_match(/^[0-9a-zA-Z]*$/, an) + assert_equal(n, an.length) end end |