Sha256: 7c508c4e2682d2dbb1abb91d403b8b6d8c4ebe0e9696da8628f8d204965d3d13

Contents?: true

Size: 512 Bytes

Versions: 9

Compression:

Stored size: 512 Bytes

Contents

# This will guess the Structure class
FactoryGirl.define do
  factory :structure_page, :class => Structure do
    title 'Structure'
    slug { Factory.next(:slug) }
    structure_type StructureType.page
    position_type PositionType.menu
    is_visible true
  end

  factory :structure_main, :class => Structure do
    title "Main page"
    slug "main-page"
    structure_type StructureType.main
    position_type PositionType.default
    is_visible true
  end

  sequence :slug do |n|
    "slug#{n}"
  end
end

Version data entries

9 entries across 7 versions & 4 rubygems

Version Path
sunrise-core-0.2.2 lib/generators/sunrise/templates/spec/factories/structure_factory.rb
sunrise-core-0.2.1 lib/generators/sunrise/templates/spec/factories/structure_factory.rb
sunrise-core-0.2.1 spec/tmp/spec/factories/structure_factory.rb
sunrise-widgets-0.1.1 spec/factories/structure_factory.rb
sunrise-locales-0.1.0 spec/factories/structure_factory.rb
sunrise-core-0.2.0 spec/tmp/spec/factories/structure_factory.rb
sunrise-core-0.2.0 lib/generators/sunrise/templates/spec/factories/structure_factory.rb
sunrise-widgets-0.1.0 spec/factories/structure_factory.rb
sunrise-questions-0.1.0 spec/factories/structure_factory.rb