Sha256: 2d00604538e7dc6f8cd31783d97b300bef131bb9873425e108fe1132c30a004f

Contents?: true

Size: 1.08 KB

Versions: 12

Compression:

Stored size: 1.08 KB

Contents

Factory.define(:page) do |f|
  f.sequence(:title) { |i| "Cool Page #{i}" }
  f.slug { |a| a.title.downcase.gsub(/[^-a-z0-9~\s\.:;+=_]/, '').gsub(/[\s\.:;=+]+/, '-') }
  f.breadcrumb { |a| a.title }
end

Factory.define(:romanian_page_translation, :class => Page::Translation, :parent => :page) do |f|
  f.locale "ro"
  f.association :page, :factory => :page
  f.title "Pagina Cool"
end

Factory.define(:page_part) do |f|
  f.name "body"
  f.association :page, :factory => :page
  f.content "english content"
end

Factory.define(:romanian_page_part_translation, :class => PagePart::Translation) do |f|
  f.locale :ro
  f.association :page_part, :factory => :page_part
  f.content "continut romanesc"
end

Factory.define(:layout) do |f|
  f.sequence(:name) { |i| "Cool layout #{i}" }
  f.content "english content"
end

Factory.define(:snippet) do |f|
  f.sequence(:name) { |i| "Cool snippet #{i}" }
  f.content "english content"
end

Factory.define(:child_page, :class => "page", :parent => :page) do |f|
  f.sequence(:title) {|i| "Child page #{i}"}
  f.association :parent, :factory => :page
  f.status_id 100
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
radiant-globalize2-extension-0.3.2 spec/factories.rb
radiant-globalize2-extension-0.3.1 spec/factories.rb
radiant-globalize2-extension-0.3.0 spec/factories.rb
radiant-globalize2-extension-0.2.8 spec/factories.rb
radiant-globalize2-extension-0.2.7 spec/factories.rb
radiant-globalize2-extension-0.2.6 spec/factories.rb
radiant-globalize2-extension-0.2.5 spec/factories.rb
radiant-globalize2-extension-0.2.4 spec/factories.rb
radiant-globalize2-extension-0.2.3 spec/factories.rb
radiant-globalize2-extension-0.2.2 spec/factories.rb
radiant-globalize2-extension-0.2.1 spec/factories.rb
radiant-globalize2-extension-0.2.0 spec/factories.rb