Module: Factory::Syntax::Make

Defined in:
lib/factory_girl/syntax/make.rb

Overview

Extends ActiveRecord::Base to provide a make class method, which is a shortcut for Factory.create.

Usage:

require 'factory_girl/syntax/make'

Factory.define :user do |factory|
  factory.name 'Billy Bob'
  factory.email '[email protected]'
end

User.make(:name => 'Johnny')

This syntax was derived from Pete Yandell’s machinist.

Defined Under Namespace

Modules: ActiveRecord