# user.author Factory(:author_yas)
end
+Factory.define :author, :class => Author do |author|
+ author.name nil
+ author.sequence(:user_id) { |n| n}
+end
+
Factory.define :author_yas, :class => Author do |author|
author.name 'yassan'
author.sequence(:user_id) { |n| n}
# author.artist Factory(:artist_yas)
end
+Factory.define :artist, :class => Artist do |artist|
+ artist.sequence(:email) { |n| "hoge#{n}@gmail.com"}
+ artist.name nil
+# artist.association :author_yas
+end
+
Factory.define :artist_yas, :class => Artist do |artist|
artist.sequence(:email) { |n| "hoge#{n}@gmail.com"}
artist.name 'yas'