spec/factories.rb in almanac-0.4.5 vs spec/factories.rb in almanac-0.5.0

- old
+ new

@@ -1,15 +1,17 @@ FactoryGirl.define do sequence(:tag_list) {|n| "common,test#{n},rspec#{n},ruby#{n},#rails#{n}" } + sequence(:slug) {|n| "#{Faker::Lorem.word}-#{Faker::Lorem.word}-#{n}" } sequence(:author_id) factory :user, :class => User do email { Faker::Internet.safe_email } password { Faker::Lorem.characters(10) } end factory :post, :class => Almanac::Post do title { Faker::Lorem.sentence(3) } + slug { generate(:slug) } excerpt { Faker::Lorem.sentence(1) } body { Faker::Lorem.paragraph(5) } published true tag_list { generate(:tag_list) } author_id { generate(:author_id) }