Sha256: a7953f75c453473c07b33d30cb4a9780fa2ec30dc3083184ca22b4c2e6978848

Contents?: true

Size: 679 Bytes

Versions: 14

Compression:

Stored size: 679 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 :placeholder_brick, class: 'Kuhsaft::PlaceholderBrick' do |tb|
    tb.type 'Kuhsaft::PlaceholderBrick'
    tb.template_name 'foo'
  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

14 entries across 14 versions & 2 rubygems

Version Path
kuhsaft-2.5.2 spec/factories.rb
kuhsaft-2.5.1 spec/factories.rb
kuhsaft-2.5.0 spec/factories.rb
qbrick-2.5.0.pre spec/factories.rb
kuhsaft-2.4.3 spec/factories.rb
kuhsaft-2.4.2 spec/factories.rb
kuhsaft-2.4.1 spec/factories.rb
kuhsaft-2.4.0 spec/factories.rb
kuhsaft-2.3.6 spec/factories.rb
kuhsaft-2.3.5 spec/factories.rb
kuhsaft-2.3.4 spec/factories.rb
kuhsaft-2.3.3 spec/factories.rb
kuhsaft-2.3.2 spec/factories.rb
kuhsaft-2.3.1 spec/factories.rb