Permalink
Browse files

add a task for generating random junk data for when benchmarking

  • Loading branch information...
1 parent 4298d8b commit d069de3d80fd2ff613ce2584bb674710669b6225 @NZKoz committed Aug 31, 2008
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/tasks/random.rake
View
@@ -0,0 +1,9 @@
+task :random=>:environment do
+ 500.times do |i|
+ number_of_recipients = rand(10)
+ g = Greeting.create! :comment=>"This is greeting #{i} with #{number_of_recipients} recipients"
+ number_of_recipients.times do |j|
+ g.recipients.create! :name=>"I am recipient #{j} of greeting #{i}"
+ end
+ end
+end

0 comments on commit d069de3

Please sign in to comment.