factory girl - How do I use factories from FactoryGirl in rails console -


i using rails console in development environment , want use factories. how can access them?

i have tried require "factorygirl" returns

1.9.3p393 :301 > require "factorygirl" loaderror: cannot load such file -- factorygirl 

to solve problem ensure factory girl gem specifed in gemfile similar this

group :development, :test   gem 'factory_girl_rails' end 

then bundle install.

this should make factorygirl class available in development console.

hope helps.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -