Sha256: e739fcaa8b4ac595040514843f756dd75a3fc1f72848def495ff54b3e94aee94

Contents?: true

Size: 571 Bytes

Versions: 12

Compression:

Stored size: 571 Bytes

Contents

Factory.define :localized_page, :class => Kuhsaft::LocalizedPage do |p|
  p.locale 'en'
  p.title { "English Title #{Factory.next(:title)}" }
  p.published 1
  p.body 'hi'
  p.url ''
  p.association :page
end

Factory.define :page, :class => Kuhsaft::Page do |p|
  p.position 1
  p.after_create do |page|
    page.localized_pages << Factory.create(:localized_page, :page => page)
  end
end

Factory.define :asset, :class => Kuhsaft::Asset do |a|
  a.file File.open("#{Kuhsaft::Engine.root}/spec/dummy/public/images/spec-image.png")
end

Factory.sequence(:title) { |n| n }

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kuhsaft-0.2.legacy4 spec/factories.rb
kuhsaft-0.2.legacy3 spec/factories.rb
kuhsaft-0.2.legacy2 spec/factories.rb
kuhsaft-0.2.legacy spec/factories.rb
kuhsaft-0.2.5 spec/factories.rb
kuhsaft-0.2.4 spec/factories.rb
kuhsaft-0.2.3 spec/factories.rb
kuhsaft-0.3.1 spec/factories.rb
kuhsaft-0.3.0 spec/factories.rb
kuhsaft-0.2.2 spec/factories.rb
kuhsaft-0.2.1 spec/factories.rb
kuhsaft-0.2 spec/factories.rb