This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Usage
Add factories to test/factories.rb, spec/factories.rb file, or under a test/factories or spec/factories directory:
Factory.define :user do |f| f.first_name 'John' f.last_name 'Doe' end Factory.define :admin, :parent => :user do |f| f.admin true end
Once your factories are defined, you can use them in the following ways:
# Saved instance user = Factory(:user) # Unsaved instance user = Factory.build(:user) # Attribute hash user_attributes = Factory.attributes_for(:user) # Stubbed object user_stub = Factory.stub(:user) # Override attributes user = Factory(:user, :first_name => 'Joe')






