Sha256: 953957d928d6911d10c0764e3f453b450c66deb82267c4ea1ef4e61468cee772

Contents?: true

Size: 575 Bytes

Versions: 10

Compression:

Stored size: 575 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/app/assets/images/spec-image.png")
end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuhsaft-0.3.4.legacy3 spec/factories.rb
kuhsaft-0.3.4.legacy2 spec/factories.rb
kuhsaft-0.3.4.legacy spec/factories.rb
kuhsaft-0.3.6 spec/factories.rb
kuhsaft-0.3.5 spec/factories.rb
kuhsaft-0.3.4 spec/factories.rb
kuhsaft-0.3.4.rc2 spec/factories.rb
kuhsaft-0.3.4.rc1 spec/factories.rb
kuhsaft-0.3.3 spec/factories.rb
kuhsaft-0.3.2 spec/factories.rb