FactoryGirl.define do factory :user_action, :class => 'UserActions' do user_id 1 action_type "MyString" action_id 1 end end