FactoryBot.define do factory :task_template, class: Ecom::Core::TaskTemplate do sequence :code do |n| "TTCode#{n}" end name { FFaker::Name.name } description { FFaker::Name.name } association :task_template_type has_takeoff_fields { false } fields { [{ name: 'length', label: 'Length' }] } end end