mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 02:26:23 +00:00
18 lines
293 B
Ruby
18 lines
293 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
FactoryBot.define do
|
||
|
factory :post, class: Post do
|
||
|
site
|
||
|
document
|
||
|
layout
|
||
|
|
||
|
locale do
|
||
|
('a'..'z').to_a.sample(2).join
|
||
|
end
|
||
|
|
||
|
initialize_with do
|
||
|
new(site: site, layout: layout, document: document, locale: locale)
|
||
|
end
|
||
|
end
|
||
|
end
|