lib/queencheck/string.rb in queencheck-0.0.1 vs lib/queencheck/string.rb in queencheck-0.0.2

- old
+ new

@@ -1,11 +1,11 @@ require 'queencheck/arbitrary' class String extend QueenCheck::Arbitrary - @@max_length = 3000 + @@max_length = 256 set_arbitrary do | seed | max = (@@max_length * (seed * seed)).ceil charset = [] @@ -36,10 +36,10 @@ def sample; self[rand(self.length)]; end end end ret = [] - (rand(max/2) + (max/2)).times do + (rand(max/2) + (max/2)).ceil.times do ret << charset.sample end return ret.pack('U*') end