blob: 9818c072cc878a9cf605b5fbe6d2d93c33e5dbad (
plain) (
tree)
|
|
FactoryGirl.define do
factory :blog_comment, :class => Refinery::BlogComment do
name "Joe Commenter"
sequence(:email) { |n| "person#{n}@example.com" }
body "Which one is the best for picking up new shoes?"
association :post, :factory => :blog_post
trait :approved do
state 'approved'
end
trait :rejected do
state 'rejected'
end
factory :approved_comment, :traits => [:approved]
factory :rejected_comment, :traits => [:rejected]
end
end
|