Skip to content
krainboltgreene edited this page Jul 21, 2011 · 2 revisions

You'll want to read individual Forgery categories for more information, but these are the basics:

Forgery(:basic).password
  #=> "b6qZTQEH"

Forgery(:internet).email_address
  #=> "[email protected]"

Forgery(:monetary).money
  #=> "1.58"

Forgery(:lorem_ipsum).words(10)
  #=> "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam egestas."

Forgery(:monetary).formatted_money :min => 100, :max => 1000
  #=> "$923.36"

And many many more!

Alternatively you can write it like this:

Forgery::Basic.hex_color
Forgery::Name.full_name
Forgery::Personal.shirt_size

In addition, you can always write your own dictionaries and formats, overriding the ones in the gem. Fully explained here.

Clone this wiki locally