Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FactoryGirl definitions not found if FactoryGirl required before Combustion.initialize! invoked #33

Closed
apsoto opened this issue Jan 14, 2013 · 4 comments

Comments

@apsoto
Copy link

apsoto commented Jan 14, 2013

Things started breaking for me with 'Factory not registered' errors. I tracked it down to adding the 'factory_girl_rails' gem to my Gemfile. Bundler autorequires it, which was causing FactoryGirl.definition_file_paths to already be resolved to spec/internal for it's factories.

I worked around it by disabling autorequiring in my Gemfile:

gem 'factory_girl_rails', :require => false

And then manually requiring it in my spec_helper.rb after Combustion.initialize!:

Combustion.initialize!
require 'rspec/rails'
require 'factory_girl_rails'

However, it might be nice if Combustion can somehow fix this.

@parndt
Copy link
Collaborator

parndt commented Jan 14, 2013

How could Combustion fix this? Maybe a README entry?

@pat
Copy link
Owner

pat commented Jan 14, 2013

I think a README entry is probably best - as the load order is important (I would like Combustion to auto-load more things, but then that makes life hard for anyone doing something slightly different), and we can't presume how other gems behave with regards to loading their dependencies and getting set up.

@apsoto
Copy link
Author

apsoto commented Jan 14, 2013

👍

no code = no bugs ;)

@pat
Copy link
Owner

pat commented Jan 15, 2013

@pat pat closed this as completed Jan 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants