Module: FactoryGirl::Syntax::Make

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

Overview

Extends MongoMapper::Document to provide a make class method, which is a shortcut for FactoryGirl.create.

Usage:

require 'factory_girl/syntax/mongo_mapper'

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

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

This syntax was derived from Pete Yandell’s machinist.

Defined Under Namespace

Modules: ActiveRecord, MongoMapper