Sha256: fd10c86fa449dac10a33a371081b3d4fb57dbf79a99550e3f98f4c2d0888b7ca
Contents?: true
Size: 934 Bytes
Versions: 16
Compression:
Stored size: 934 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do factory :works_cited_citation, class: WorksCited::Citation do citation_type { %w[book periodical electronic interview email tweet].sample } media { 'print' } record { Doodad.first } title { Faker::Book.title } container_title { Faker::Book.title } publisher { Faker::Book.publisher } city { Faker::Address.city } edition { nil } volume { nil } series { nil } year { [*1..100].sample.years.ago.year } url { Faker::Internet.url } published_at { 1.year.ago } accessed_at { 1.month.ago } pages { 'pp. 145-6' } transient do contributors_count { 0 } end after(:build) do |citation, evaluator| citation.works_cited_contributors << build_list(:works_cited_contributor, evaluator.contributors_count, works_cited_citation: citation) end end end
Version data entries
16 entries across 16 versions & 1 rubygems