Sha256: e079cff7275a309af32a3cb42aadd4ad618e29693c45573a878844fbf2fcd2a6

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 Bytes

Contents

FactoryBot.define do
  factory :haystack_tag, class: "HaystackTag" do
    sequence(:name) { |n| "Tag #{n}" }
    sequence(:description) { |n| "Description #{n}" }

    trait :root do
      name { "root" }
      description { "Root tag" }
      parent_tag { nil }
    end

    trait :child do
      association :parent_tag, factory: :haystack_tag
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
needle_in_a_haystack-1.0.6 spec/factories/haystack_tags.rb