Reputation: 1215
Hi I have a class named class Admin::Admin < ActiveRecord::Base
And I have a factory called
FactoryGirl.define do
factory :admin_admin do
However, I keep on getting uninitialized constant AdminAdmin
when I run the spec test that uses this factory.
Any idea what might be wrong?
Upvotes: 0
Views: 189
Reputation: 1215
Figured it out, you should define your factorygirl as the following:
FactoryGirl.define do
factory :admin_admin, class: Admin::Admin do |f|
Upvotes: 3