mirror of
https://github.com/askn/faker.git
synced 2023-08-10 21:13:01 +03:00
update crystal version
This commit is contained in:
parent
2f11a2121f
commit
393096792d
@ -51,7 +51,7 @@ describe Faker::Internet do
|
||||
(1..32).to_a.each do |min_length|
|
||||
(min_length + 1..33).each do |max_length|
|
||||
u = Faker::Internet.user_name((min_length...max_length), %w(=))
|
||||
assert { u.size.between? min_length, max_length - 1 }
|
||||
assert { min_length <= u.size <= max_length - 1 }
|
||||
assert { u.match(/\A[a-z]+((=)?[a-z]*)*\z/) }
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@ module Faker
|
||||
class Finance
|
||||
CREDIT_CARD_TYPES = (Data["credit_card"] as Hash).keys
|
||||
|
||||
def self.credit_card(types = [] of Array(String) : Array)
|
||||
def self.credit_card(types : Array = [] of Array(String))
|
||||
types = CREDIT_CARD_TYPES if types.empty?
|
||||
type = types.sample
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user