Files
growstuff/spec/factories/crop.rb
Miles Gould 8d2fe8809d Add an uppercase crop factory.
Use it to test that crops are sorted alphabetically in the plantings
form.
2013-01-25 11:12:44 +00:00

46 lines
882 B
Ruby

FactoryGirl.define do
factory :crop do
system_name "Magic bean"
en_wikipedia_url "http://en.wikipedia.org/wiki/Magic_bean"
factory :tomato do
system_name "Tomato"
en_wikipedia_url "http://en.wikipedia.org/wiki/Tomato"
end
factory :maize do
system_name "Maize"
en_wikipedia_url "http://en.wikipedia.org/wiki/Maize"
end
factory :chard do
system_name "Chard"
end
factory :walnut do
system_name "Walnut"
end
factory :apple do
system_name "Apple"
end
factory :pear do
system_name "Pear"
end
# This should have a name that is alphabetically earlier than :uppercase
# crop to ensure that the ordering tests work.
factory :lowercasecrop do
system_name "ffrench bean"
end
factory :uppercasecrop do
system_name "Swiss chard"
end
end
end