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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -