Sha256: 311253bd92cb1008393df2ed8f5d28ee31b62649ec13fa511cf13f849f5eb83e

Contents?: true

Size: 225 Bytes

Versions: 2

Compression:

Stored size: 225 Bytes

Contents

FactoryBot.define do
  factory :post do
    sequence(:title) { |n| "Post #{n}" }
    body { "lorem ipsum 2" }
    status { Post::DRAFT }

    category

    trait :reviewed do
      status { Post::REVIEWED }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rs-active_admin-state_machine-0.2.1 spec/factories/posts.rb
rs-active_admin-state_machine-0.2.0 spec/factories/posts.rb