Sha256: d38b9697ff41738a5843ecf19981470e812a1fb7572f3f4f0903fbb5fa2efa24

Contents?: true

Size: 1.56 KB

Versions: 13

Compression:

Stored size: 1.56 KB

Contents

## Site ##
Factory.define :site do |s|
  s.name 'Acme Website'
  s.subdomain 'acme'
  s.created_at Time.now
end

# Accounts ##
Factory.define :account do |a|
  a.name 'Bart Simpson'
  a.email 'bart@simpson.net'
  a.password 'easyone'
  a.password_confirmation 'easyone'
  a.locale 'en'
end

## Memberships ##
Factory.define :membership do |m|
  m.association :account, :factory => :account
  m.admin true
end

## Pages ##
Factory.define :page do |p|
  p.association :site, :factory => :site
  p.title 'Home page'
  p.slug 'index'
end

## Liquid templates ##
Factory.define :liquid_template do |t|
  t.association :site, :factory => :site
  t.name 'Simple one'
  t.slug 'simple_one'
  t.value %{simple liquid template}
end

## Layouts ##
Factory.define :layout do |l|
  l.association :site, :factory => :site
  l.name '1 main column + sidebar'
  l.value %{<html>
    <head>
      <title>My website</title>
    </head>
    <body>
      <div id="sidebar">\{\{ content_for_sidebar "Left Sidebar"\}\}</div>
      <div id="main">\{\{ content_for_layout \}\}</div>
    </body>
  </html>}
end

## Snippets ##
Factory.define :snippet do |s|
  s.association :site, :factory => :site
  s.name 'My website title'
  s.slug 'header'
  s.value %{<title>Acme</title>}
end

## Theme assets ##
Factory.define :theme_asset do |a|
  a.association :site
end

## Asset collections ##
Factory.define :asset_collection do |s|
  s.association :site, :factory => :site
  s.name 'Trip to Chicago'
end

## Content types ##
Factory.define :content_type do |t|
  t.association :site, :factory => :site
  t.name 'My project'
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
locomotive_cms-0.0.2.7 spec/factories.rb
locomotive_cms-0.0.2.6 spec/factories.rb
locomotive_cms-0.0.2.5 spec/factories.rb
locomotive_cms-0.0.2.4 spec/factories.rb
locomotive_cms-0.0.2.3 spec/factories.rb
locomotive_cms-0.0.2.2 spec/factories.rb
locomotive_cms-0.0.2.1 spec/factories.rb
locomotive_cms-0.0.2 spec/factories.rb
locomotive_cms-0.0.1.4 spec/factories.rb
locomotive_cms-0.0.1.3 spec/factories.rb
locomotive_cms-0.0.1.2 spec/factories.rb
locomotive_cms-0.0.1.1 spec/factories.rb
locomotive_cms-0.0.1 spec/factories.rb