user276712
user276712

Reputation: 892

rspec / factory girl causing SystemStackError in Rails 3

I'm getting this error when running rspec on a spec file:

MYPATH/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419: stack level too deep (SystemStackError)

Here is the line it is called on:

require 'spec_helper'
require 'factory_girl'

FactoryGirl.find_definitions

Here are my versions of relevant gems:

factory_girl 2.1.0

rails 3.0.10

rspec 2.6.0

Upvotes: 0

Views: 305

Answers (2)

codervince
codervince

Reputation: 425

or remove:

FactoryGirl.reload

This is what solved this issue for me

Upvotes: 0

antonversal
antonversal

Reputation: 1239

try to remove line

FactoryGirl.find_definitions

Upvotes: 1

Related Questions