Created
December 7, 2008 00:55
-
-
Save laktek/33004 to your computer and use it in GitHub Desktop.
Rake task for Text generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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