Does someone know of a good ruby testing library for generating English (or maybe also those Latin "lorem ipsum") words? Another nice thing would be to specify some additional options (e.g. the word length, only use names). Does such a thing exist?
+2
A:
Check out Faker. For example,
ruby-1.8.7-p302 > Faker::Lorem.sentence
=> "Enim molestiae incidunt rem ipsum perferendis beatae excepturi tenetur."
ruby-1.8.7-p302 > Faker::Name.name
=> "Agnes Hand II"
sluukkonen
2010-08-30 16:03:56
I like Faker a lot, it has tons of options. >> "Using #{Faker::Company.bs} for #{Faker::Company.catch_phrase}" => "Using streamline enterprise architectures for Upgradable disintermediate software" >>
Jason Noble
2010-08-30 18:25:31
+1
A:
have a look at Randexp http://github.com/mattetti/randexp
It gives you a tight control on what's generated
hellvinz
2010-08-30 16:31:29