Module | FactoryGirl::Syntax::Make |
In: |
lib/factory_girl/syntax/make.rb
|
Extends ActiveRecord::Base to provide a make class method, which is a shortcut for FactoryGirl.create.
Usage:
require 'factory_girl/syntax/make' FactoryGirl.define do factory :user do name 'Billy Bob' email 'billy@bob.example.com' end end User.make(:name => 'Johnny')
This syntax was derived from Pete Yandell‘s machinist.