Created
June 21, 2011 05:07
-
-
Save huobazi/1037280 to your computer and use it in GitHub Desktop.
create some test topics
This file contains hidden or 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
user = User.create :username => 'test', :email => '[email protected]', :password => 'test@123456', :password_confirmation => 'test@123456' | |
30.times do |n| | |
topic = user.topics.create :title => "My Topic #{n}", :content => "Here is topic content", :tags => "tag,Test" | |
10.times do | |
reply = Reply.new :content => 'Here is reply content' | |
reply.user = user | |
reply.topic = topic | |
reply.save | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment