Module: FactoryGirl::Syntax::Blueprint
- Defined in:
- lib/factory_girl/syntax/blueprint.rb,
lib/factory_girl/syntax/mongo_mapper.rb
Overview
Extends MongoMapper::Document to provide a make class method, which is an alternate syntax for defining factories.
Usage:
require 'factory_girl/syntax/mongo_mapper'
User.blueprint do
name { 'Billy Bob' }
email { '[email protected]' }
end
FactoryGirl.create(:user, :name => 'Johnny')
This syntax was derived from Pete Yandell’s machinist.
Defined Under Namespace
Modules: ActiveRecord, MongoMapper