Retrospring/spec/factories/comment.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
261 B
Ruby
Raw Normal View History

2020-04-29 10:55:05 -07:00
# frozen_string_literal: true
FactoryBot.define do
factory :comment do
transient do
answer_content { Faker::Lorem.sentence }
end
content { Faker::Lorem.sentence }
answer { FactoryBot.build(:answer, content: answer_content) }
end
end