rails / spring

Rails application preloader
MIT License
2.81k stars 341 forks source link

Factories from engine not loaded #412

Open tuxayo opened 9 years ago

tuxayo commented 9 years ago

On an application that use Spree (for e-commerce), to use the factories, we do in factories.rb :

require "spree/testing_support/factories"

Factories work with launching Rspec and Cucumber directly but with Spring, it fails with:

ArgumentError:
   Factory not registered: user

I suspect this is related to engines because on another app with factories from an engine, we have the same error.

Spring 1.3.6 Ruby 2.2.2 Rails 4.2.3 FactoryGirl 4.5.0

johnwook commented 9 years ago

I hope this would help https://gist.github.com/johnwook/784af45124cfc841f8a2