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 | 6cba29b4220cc0277f209af9d172f4ec1ddb5f0e (patch) | |
tree | 4324a47627dba6650cc4797b9d26969c25f2092c /test | |
parent | 2c27e52f8ebdf4d382a12b224707d14f2ca589ed (diff) | |
download | ruby-6cba29b4220cc0277f209af9d172f4ec1ddb5f0e.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')
-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 |