Skip to content

Instantly share code, notes, and snippets.

@laktek
Created December 7, 2008 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laktek/33004 to your computer and use it in GitHub Desktop.
Save laktek/33004 to your computer and use it in GitHub Desktop.
Rake task for Text generation
require "config/environment"
require "faker"
module Faker
class Lorem
Words = %w(am is are was when done here get could can have has smart cool I my we they he it she them Ruby on rails merb jruby web2.0 1.9 mashups advent 2008 tools linux apache Zed Shaw David quoted Gems plugins routes passive aggressive real world code refactor simple testing rspec behavior driven benchmark profile use server client service impressive number generator rake make done )
end
end
namespace :posts do
desc "Creates a new blog post"
task :create do
Ticket.create(:content => Faker::Lorem.paragraphs(5),
:title => Faker::Lorem.sentence(3),
:author => Faker::Name.first_name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment