Sha256: 849840706b94eaa3ea32c4322682d47b0c19e4200c3bf86cf1c79ac0954e67bc

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

FactoryGirl.define do
  sequence(:title) { |n| n }

  factory :page, class: 'Kuhsaft::Page' do |p|
    p.parent nil
    p.position 1
    p.title { "English Title #{FactoryGirl.generate(:title)}" }
    p.published 1
    p.body 'lorem ipsum'
    p.url ''
  end

  factory :text_brick, class: 'Kuhsaft::TextBrick' do |tb|
    tb.type 'Kuhsaft::TextBrick'
    tb.text 'DummyText'
  end

  factory :asset, class: Kuhsaft::Asset do |a|
    a.file File.open("#{Kuhsaft::Engine.root}/spec/dummy/app/assets/images/spec-image.png")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuhsaft-2.3.0 spec/factories.rb