debian-mirror-gitlab/spec/factories/plans.rb

14 lines
284 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :plan do
Plan.all_plans.each do |plan|
factory :"#{plan}_plan" do
name { plan }
title { name.titleize }
2020-10-24 23:57:45 +05:30
initialize_with { Plan.find_or_create_by!(name: plan) }
2020-05-24 23:13:21 +05:30
end
end
end
end