make a fake data for personal conference plugin

This commit is contained in:
Rueshyna authored and chris committed 2013-02-21 13:53:50 +08:00
1 parent 1c4b696052
commit 2afbae7c08
9 files changed
+99 -62

No files matched your search

+38 -28
View File
@@ -6,43 +6,53 @@ FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/*
FactoryGirl.find_definitions
CoAuthorRelation.destroy_all
CoAuthor.destroy_all
JournalLevelType.destroy_all
WritingJournalFile.destroy_all
WritingJournal.destroy_all
ConferenceCoAuthorRelation.destroy_all
ConferenceCoAuthor.destroy_all
ConferencePaperType.destroy_all
WritingConferenceFile.destroy_all
WritingConference.destroy_all
#Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f}
10.size.times do
FactoryGirl.create(:journal_level)
2.times do
FactoryGirl.create(:conference_paper_type)
end
10.times do
FactoryGirl.create(:journal_relation)
end
50.times do
FactoryGirl.create(:journal)
end
50.times do
FactoryGirl.create(:journal_co_author)
end
10.size.times do
FactoryGirl.create(:conference_level)
end
10.times do
FactoryGirl.create(:conference_relation)
end
50.times do
FactoryGirl.create(:conference)
FactoryGirl.create(:conference_co_author_relation)
end
50.times do
FactoryGirl.create(:conference_co_author)
end
50.times do
FactoryGirl.create(:writing_conference)
end
puts "Success!"
# =======
#
#CoAuthorRelation.destroy_all
#CoAuthor.destroy_all
#JournalLevelType.destroy_all
#WritingJournalFile.destroy_all
#WritingJournal.destroy_all
#
#10.size.times do
# FactoryGirl.create(:journal_level)
#end
#
#10.times do
# FactoryGirl.create(:journal_relation)
#end
#
#50.times do
# FactoryGirl.create(:journal)
#end
#
#50.times do
# FactoryGirl.create(:journal_co_author)
#end
#puts "Success!"