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

107 lines
2.4 KiB
Crystal
Raw Normal View History

2016-01-05 17:49:33 +03:00
require "../src/faker"
puts "\n### Faker::Address\n\n"
puts Faker::Address.city
puts Faker::Address.street_name
puts Faker::Address.street_address
puts Faker::Address.secondary_address
2016-01-06 15:21:35 +03:00
puts Faker::Address.building_number
2016-01-05 17:49:33 +03:00
puts Faker::Address.zip_code
puts Faker::Address.postcode
2016-01-06 15:35:08 +03:00
puts Faker::Address.time_zone
2016-01-05 17:49:33 +03:00
puts Faker::Address.street_suffix
puts Faker::Address.city_suffix
puts Faker::Address.city_prefix
puts Faker::Address.state
puts Faker::Address.state_abbr
puts Faker::Address.country
2016-01-05 23:25:13 +03:00
puts Faker::Address.latitude
puts Faker::Address.longitude
2016-01-06 17:37:20 +03:00
puts "\n### Faker::Commerce\n\n"
puts Faker::Commerce.color
puts Faker::Commerce.department
puts Faker::Commerce.product_name
2016-01-07 10:26:30 +03:00
puts Faker::Commerce.price
2016-01-06 17:37:20 +03:00
2016-01-05 17:49:33 +03:00
puts "\n### Faker::Company\n\n"
puts Faker::Company.name
puts Faker::Company.suffix
2016-01-06 15:21:35 +03:00
puts Faker::Company.catch_phrase
puts Faker::Company.bs
2016-01-05 17:49:33 +03:00
puts "\n\t### Faker::Internet\n\n"
puts Faker::Internet.email
puts Faker::Internet.email("Nancy")
puts Faker::Internet.free_email
puts Faker::Internet.free_email("Nancy")
2016-01-06 15:21:35 +03:00
puts Faker::Internet.safe_email
puts Faker::Internet.safe_email("Nancy")
2016-01-05 17:49:33 +03:00
puts Faker::Internet.user_name
puts Faker::Internet.user_name("Nancy")
2016-01-06 16:57:20 +03:00
puts Faker::Internet.user_name("Nancy Johnson", %w(. _ -))
2016-01-05 17:49:33 +03:00
2016-01-07 10:26:30 +03:00
puts Faker::Internet.password
puts Faker::Internet.password(12)
2016-01-05 17:49:33 +03:00
puts Faker::Internet.domain_name
puts Faker::Internet.domain_word
puts Faker::Internet.domain_suffix
puts Faker::Internet.ip_v4_address
2016-01-06 17:01:56 +03:00
puts Faker::Internet.url
puts Faker::Internet.slug
2016-01-05 17:49:33 +03:00
puts "\n\t### Faker::Lorem\n\n"
puts Faker::Lorem.words
puts Faker::Lorem.words(4)
2016-01-06 15:21:35 +03:00
puts Faker::Lorem.characters
puts Faker::Lorem.characters(10)
2016-01-05 17:49:33 +03:00
puts Faker::Lorem.sentence
puts Faker::Lorem.sentence(3)
puts Faker::Lorem.sentences
puts Faker::Lorem.sentences(1)
puts Faker::Lorem.paragraph
puts Faker::Lorem.paragraph(2)
puts Faker::Lorem.paragraphs
puts Faker::Lorem.paragraphs(1)
puts "\n\t### Faker::Name\n\n"
puts Faker::Name.name
puts Faker::Name.first_name
puts Faker::Name.last_name
puts Faker::Name.prefix
puts Faker::Name.suffix
2016-01-06 10:23:15 +03:00
puts Faker::Name.title
2016-01-05 17:49:33 +03:00
2016-01-06 16:16:07 +03:00
puts "\n\t### Faker::Number\n\n"
puts Faker::Number.number(10)
2016-01-07 10:31:24 +03:00
puts Faker::Number.decimal(2)
puts Faker::Number.decimal(2, 3)
2016-01-06 16:16:07 +03:00
puts Faker::Number.digit
2016-01-05 17:49:33 +03:00
puts "\n\t### Faker::PhoneNumber\n\n"
puts Faker::PhoneNumber.phone_number
2016-01-12 09:57:54 +03:00
puts "\n\t### Faker::Business\n\n"
p Faker::Business.credit_card_number
p Faker::Business.credit_card_expiry_date
p Faker::Business.credit_card_type