1) Edit the Gemfile
group :test do . . . gem 'factory_girl_rails', '4.1.0' end
2) Install it
$ bundle install
3) Factory Girl format for Person model
FactoryGirl.define do factory :person do name "Michael Hartl" email "michael@example.com" password "foobar" password_confirmation "foobar" end end
0 comments:
Post a Comment