1
0
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:
Aşkın Gedik 2016-03-26 23:42:45 +02:00
parent 2f11a2121f
commit 393096792d
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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