Sha256: 26064b839289764c7407ab2deb83b8d41cb2d457a2df7289c45414297898f2d7

Contents?: true

Size: 582 Bytes

Versions: 84

Compression:

Stored size: 582 Bytes

Contents

FactoryGirl.define do
  factory :version, class: Pulitzer::Version do
    status { Pulitzer::Version.statuses[:preview] }
    association :post

    trait :with_content_elements do
      after(:create) do |version|
        create_list(:content_element, 3, version_id: version.id)
      end
    end

    trait :with_free_form_sections do
      after(:create) do |version|
        version.free_form_sections.create(name: 'section A')
        version.free_form_sections.create(name: 'section B')
        version.free_form_sections.create(name: 'section C')
      end
    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
pulitzer-0.15.11 spec/factories/version.rb
pulitzer-0.15.10 spec/factories/version.rb
pulitzer-0.15.9 spec/factories/version.rb
pulitzer-0.15.8 spec/factories/version.rb
pulitzer-0.15.7 spec/factories/version.rb
pulitzer-0.15.6 spec/factories/version.rb
pulitzer-0.15.5 spec/factories/version.rb
pulitzer-0.15.4 spec/factories/version.rb
pulitzer-0.15.3 spec/factories/version.rb
pulitzer-0.15.2 spec/factories/version.rb
pulitzer-0.15.1 spec/factories/version.rb
pulitzer-0.15.0 spec/factories/version.rb
pulitzer-0.14.4 spec/factories/version.rb
pulitzer-0.14.3 spec/factories/version.rb
pulitzer-0.14.2 spec/factories/version.rb
pulitzer-0.14.1 spec/factories/version.rb
pulitzer-0.14.0 spec/factories/version.rb
pulitzer-0.13.1 spec/factories/version.rb
pulitzer-0.12.5 spec/factories/version.rb
pulitzer-0.13.0 spec/factories/version.rb