2012-11-15 17:53:17 +00:00
|
|
|
require 'factory_girl'
|
2012-11-26 16:05:04 +00:00
|
|
|
require 'faker'
|
2012-11-26 03:52:11 +00:00
|
|
|
|
2013-01-17 07:57:12 +00:00
|
|
|
FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/*/spec/factories"]
|
|
|
|
|
|
|
|
FactoryGirl.find_definitions
|
|
|
|
|
|
|
|
|
2013-02-07 10:33:06 +00:00
|
|
|
ConferenceCoAuthorRelation.destroy_all
|
|
|
|
ConferenceCoAuthor.destroy_all
|
|
|
|
ConferencePaperType.destroy_all
|
|
|
|
WritingConferenceFile.destroy_all
|
|
|
|
WritingConference.destroy_all
|
2012-12-06 14:05:22 +00:00
|
|
|
#Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f}
|
2012-11-28 07:20:02 +00:00
|
|
|
|
2013-01-17 07:57:12 +00:00
|
|
|
|
2013-02-07 10:33:06 +00:00
|
|
|
2.times do
|
|
|
|
FactoryGirl.create(:conference_paper_type)
|
2012-12-05 18:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
10.times do
|
2013-02-07 10:33:06 +00:00
|
|
|
FactoryGirl.create(:conference_co_author_relation)
|
2012-12-03 09:16:28 +00:00
|
|
|
end
|
2012-11-26 16:18:34 +00:00
|
|
|
|
2012-12-05 18:10:32 +00:00
|
|
|
50.times do
|
2013-02-07 10:33:06 +00:00
|
|
|
FactoryGirl.create(:conference_co_author)
|
2013-01-28 02:56:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
50.times do
|
2013-02-07 10:33:06 +00:00
|
|
|
FactoryGirl.create(:writing_conference)
|
2013-01-28 02:56:46 +00:00
|
|
|
end
|
|
|
|
|
2012-12-06 14:29:43 +00:00
|
|
|
puts "Success!"
|
2013-02-07 10:33:06 +00:00
|
|
|
|
|
|
|
# =======
|
|
|
|
#
|
|
|
|
#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!"
|