Sha256: 41c930084f49fe09d06d4bcf829967fc17aadacfb024cf305319f8d630a20313

Contents?: true

Size: 661 Bytes

Versions: 2

Compression:

Stored size: 661 Bytes

Contents

require 'factory_girl'

Factory.define :user do |u|
  u.login 'shingara'
  u.email 'cyril.mougel@gmail.com'
end

Factory.define :article do |a|
  a.title 'A big article'
  a.body 'A content with several data'
  a.permalink 'a-big-article'
  a.published_at Time.now
  a.user Factory.build(:user)
end

Factory.define :second_article, :parent => :article do |a|
  a.title 'Another big article'
  a.published_at Time.now - 2.seconds
end

Factory.define :article_with_accent_in_html, :parent => :article do |a|
  a.title 'article with accent'
  a.body 'écoute The future is cool!'
  a.permalink 'article-with-accent'
  a.published_at Time.now - 2.seconds
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typo-5.2.98 spec/factories.rb
typo-5.3 spec/factories.rb