Method: PropCheck::Generators.alphanumeric_string
- Defined in:
- lib/prop_check/generators.rb
.alphanumeric_string(**kwargs) ⇒ Object
Generates a string containing only the characters a..z, A..Z, 0..9
Shrinks towards fewer characters, and towards lowercase ‘a’.
>> Generators.alphanumeric_string.sample(5, size: 10, rng: Random.new(42))
=> ["ZCoQ", "8uM", "wkkx0JNx", "v0bxRDLb", "Gl5v8RyWA6"]
Accepts the same options as array
511 512 513 |
# File 'lib/prop_check/generators.rb', line 511 def alphanumeric_string(**kwargs) array(alphanumeric_char, **kwargs).map(&:join) end |