Sha256: 106fd139b5c78126d588e3af7a204cac0bf7e8628a45da46f0bee44471120bdf

Contents?: true

Size: 602 Bytes

Versions: 5

Compression:

Stored size: 602 Bytes

Contents

FactoryGirl.define do
  sequence :email do |n|
    "person#{n}@example.com"
  end

  factory :admin_user, class: Brightcontent::AdminUser do
    email
    password "password"
    password_confirmation "password"
  end

  factory :blog do
    name "Blogname"
    body "Inhoud"
    featured false

    factory :featured_blog do
      featured true
    end
  end

  factory :author do
    factory :author_with_blogs do
      ignore do
        blogs_count 5
      end
      after(:create) do |author, evaluator|
        create_list(:blog, evaluator.blogs_count, author: author)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
brightcontent-core-2.1.4 spec/factories.rb
brightcontent-core-2.1.3 spec/factories.rb
brightcontent-core-2.1.2 spec/factories.rb
brightcontent-core-2.1.1 spec/factories.rb
brightcontent-core-2.1.0 spec/factories.rb