factory_girlの書き方 単一テーブル継承
単一テーブル継承
# coding: utf-8 FactoryGirl.define do factory :news do end factory :entertame_news, :parent => :news do type "News::Entertame" end factory :business_news, :parent => :news do type "News::Business" end factory :sport_news, :parent => :news do type "News::Sport" end end