1
0
mirror of https://github.com/askn/faker.git synced 2023-08-10 21:13:01 +03:00

add Number.hexadecimal

This commit is contained in:
Aşkın Gedik
2016-03-28 00:07:59 +03:00
parent a2b3ede6fa
commit ed6663e116
2 changed files with 11 additions and 0 deletions

View File

@@ -59,4 +59,9 @@ describe Faker::Number do
(random_number >= 1).should be_true
(random_number <= 100).should be_true
end
it "hexadecimal" do
Faker::Number.hexadecimal(4).match(/[0-9a-f]{4}/).should_not eq nil
Faker::Number.hexadecimal(7).match(/[0-9a-f]{7}/).should_not eq nil
end
end