blob: e0309b20bd1afc3875e56efc1ed8e8138611e92b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
FactoryGirl.define do
factory :blog_comment, :class => Refinery::Blog::Comment 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
|