Sha256: fd5bf6b7ba1dc21cfb40038d3ad9da1d67412999807580f868abcfe78c6f61bd

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

FactoryGirl.define do
  factory :post, :class => Schnitzelpress::Post do
    title { Faker::Lorem.sentence }
    body  { Faker::Lorem.paragraphs }
    published_at { Time.now }
  end

  factory :published_post, :parent => :post do
    status :published
  end

  factory :draft_post, :parent => :post do
    status :draft
  end

  factory :page, :parent => :post do
    published_at nil
  end

  factory :published_page, :parent => :page do
    status :published
    published_at nil
  end

  factory :draft_page, :parent => :page do
    status :draft
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schnitzelpress-0.2.1 spec/factories.rb
schnitzelpress-0.2.0 spec/factories.rb