FactoryGirl association model trouble: “SystemStackError: stack level too deep”
问题 I am using Ruby on Rails 3.0.9, RSpec-rails 2 and FactoryGirl. I am trying to state a Factory association model but I am in trouble. I have a factories/user.rb file like the following: FactoryGirl.define do factory :user, :class => User do attribute_1 attribute_2 ... association :account, :factory => :users_account, :method => :build, :email => 'foo@bar.com' end end and a factories/users/account.rb file like the following: FactoryGirl.define do factory :users_account, :class => Users::Account