Sha256: de43c7752da65481ec410527dbd11b8ad337ce23bab3375ff0dc8c526fd779b5

Contents?: true

Size: 770 Bytes

Versions: 14

Compression:

Stored size: 770 Bytes

Contents

Fabricator :post, class_name: 'Crowdblog::Post' do
  title                 { sequence { |i| "Random Post title #{i}" } }
  body                  { Faker::Lorem.words(rand(10) + 1) }
  state                 'drafted'
  author(fabricator: :user)
end

Fabricator :post_test, from: :post do
  title                 'This is a Test Post'
  body                  'A great post about how Crowd Interactive ROCKS!'
  author(fabricator: :user_test)
end

Fabricator :post_published, from: :post do
  title                 'This is a Published Post'
  body                  'Published Post! *yeeei*'
  state                 'published'
  published_at          { 1.minute.ago }
  publisher(fabricator: :user_publisher)
  permalink             { |post| post.title.parameterize }
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
crowdblog-0.0.16 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.15 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.14 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.13 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.12 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.10 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.9 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.8 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.7 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.6 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.5 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.4 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.3 spec/fabricators/posts_fabricator.rb
crowdblog-0.0.2 spec/fabricators/posts_fabricator.rb