diff --git a/db/seeds.rb b/db/seeds.rb index 007223849..4c23b53f3 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -47,6 +47,37 @@ stratify = FactoryGirl.create(:stage_action_option, name: 'Stratify') train = FactoryGirl.create(:stage_action_option, name: 'Train') + # Seed the details for each guide. + FactoryGirl.create(:detail_option, + name: 'Greenhouse', + category: 'environment') + FactoryGirl.create(:detail_option, name: 'Potted', category: 'environment') + FactoryGirl.create(:detail_option, name: 'Inside', category: 'environment') + FactoryGirl.create(:detail_option, name: 'Inside', category: 'environment') + outside = FactoryGirl.create(:detail_option, + name: 'Outside', + category: 'environment') + + + FactoryGirl.create(:detail_option, name: 'Loam', category: 'soil') + FactoryGirl.create(:detail_option, name: 'Clay', category: 'soil') + + FactoryGirl.create(:detail_option, name: 'Full Sun', category: 'light') + FactoryGirl.create(:detail_option, name: 'Partial Sun', category: 'light') + FactoryGirl.create(:detail_option, name: 'Shaded', category: 'light') + FactoryGirl.create(:detail_option, name: 'Indirect Light', category: 'light') + + FactoryGirl.create(:detail_option, name: 'Organic', category: 'practices') + FactoryGirl.create(:detail_option, name: 'Hydroponic', category: 'practices') + FactoryGirl.create(:detail_option, name: 'Intensive', category: 'practices') + FactoryGirl.create(:detail_option, + name: 'Conventional', + category: 'practices') + FactoryGirl.create(:detail_option, + name: 'Permaculture', + category: 'practices') + + prep = FactoryGirl.create(:stage_option, name: 'Preparation', order: 0) prep.stage_action_options = [water, fertilize, amend, prepare] @@ -76,5 +107,7 @@ dormant = FactoryGirl.create(:stage_option, name: 'Dormant', order: 8) dormant.stage_action_options = [prune, cover, tap] + + Guide.all.each{ |gde| gde.update_attributes(user: admin) } end diff --git a/test/factories/detail_options.rb b/test/factories/detail_options.rb new file mode 100644 index 000000000..d7aceae90 --- /dev/null +++ b/test/factories/detail_options.rb @@ -0,0 +1,8 @@ +FactoryGirl.define do + factory :detail_option do + name { "#{Faker::Name.last_name}" } + description { Faker::Lorem.sentence } + help { Faker::Lorem.sentence } + category { "#{Faker::Lorem.word}" } + end +end