Files
growstuff/spec/factories/garden.rb
T
2020-01-10 16:50:52 +13:00

27 lines
562 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :garden do
name { Faker::Vehicle.vin }
description { "This is a **totally** cool garden" }
owner
active { true }
area { 23 }
area_unit { "acre" }
location { "Greenwich, UK" }
factory :inactive_garden do
active { false }
end
# the following are used for testing alphabetical ordering
factory :garden_a do
name { 'A garden starting with A' }
end
factory :garden_z do
name { 'Zzzz this garden makes me sleepy' }
end
end
end