ruby on rails - FactoryGirl: Factory not registered for Engine project -


i've gone through these pages , tried many things found on pages:

factorygirl: factory not registered: user (argumenterror) cannot factory_girl running under rails 3.0.5,unexpected tconstant 'factory not registered' error in rails 4 factorygirl: factory not registered

but keep getting "factory not registered: user"

the file test/factories.rb (also tried test/factories/user_factory.rb) looks like:

factorygirl.define   factory :user     login 'mbrown@yahoo.com'     email 'mbrown@yahoo.com'   end end 

stub test:

  'just_a_test_of_testing'     u = factorygirl.create(:user)   end 

doesn't work, gives me "argumenterror: factory not registered: user"

does know "right solution"? seems "engine" related, don't know try next, ideas? maybe has fact user model of test/dummy app?

did configure definitions path in spec/support/factory_girl.rb file factorygirl documentation suggests?

factorygirl.definition_file_paths = %w(custom_factories_directory) factorygirl.find_definitions 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -