From 6cba29b4220cc0277f209af9d172f4ec1ddb5f0e Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 21 Oct 2017 16:12:46 +0000 Subject: less random generations in Random::Formatter#choose. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_securerandom.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3