Sha256: 31dd40153416d8bb36de7c2022ee2039acc2cd4125c420c8782a180e2486d897

Contents?: true

Size: 541 Bytes

Versions: 5

Compression:

Stored size: 541 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

5 entries across 5 versions & 1 rubygems

Version Path
kuhsaft-2.2.6 spec/factories.rb
kuhsaft-2.2.5 spec/factories.rb
kuhsaft-2.2.4 spec/factories.rb
kuhsaft-2.2.3 spec/factories.rb
kuhsaft-2.2.2 spec/factories.rb