From f28dad48c4080433e142b983cab582f20c8432b9 Mon Sep 17 00:00:00 2001 From: Joe Ferris Date: Tue, 17 Feb 2009 17:59:58 -0500 Subject: [PATCH] Added intro documentation for syntaxes --- lib/factory_girl/syntax.rb | 12 ++++++++++++ lib/factory_girl/syntax/blueprint.rb | 2 +- lib/factory_girl/syntax/generate.rb | 2 +- lib/factory_girl/syntax/make.rb | 2 +- lib/factory_girl/syntax/sham.rb | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 lib/factory_girl/syntax.rb diff --git a/lib/factory_girl/syntax.rb b/lib/factory_girl/syntax.rb new file mode 100644 index 0000000..638405d --- /dev/null +++ b/lib/factory_girl/syntax.rb @@ -0,0 +1,12 @@ +class Factory + # Provides alternate syntaxes for factory_girl. If you don't like the default + # syntax for defining or using factories, look at one of the Factory::Syntax + # modules: + # + # * Factory::Syntax::Blueprint: definition syntax similar to Machinist + # * Factory::Syntax::Generate: usage syntax similar to Object Daddy + # * Factory::Syntax::Make: usage syntax similar to Machinist + # * Factory::Syntax::Sham: sequence syntax similar to Machinist + module Syntax + end +end diff --git a/lib/factory_girl/syntax/blueprint.rb b/lib/factory_girl/syntax/blueprint.rb index cc30cdc..940d821 100644 --- a/lib/factory_girl/syntax/blueprint.rb +++ b/lib/factory_girl/syntax/blueprint.rb @@ -1,5 +1,5 @@ class Factory - module Syntax #:nodoc: + module Syntax # Extends ActiveRecord::Base to provide a make class method, which is an # alternate syntax for defining factories. diff --git a/lib/factory_girl/syntax/generate.rb b/lib/factory_girl/syntax/generate.rb index 2be75ee..1d257cf 100644 --- a/lib/factory_girl/syntax/generate.rb +++ b/lib/factory_girl/syntax/generate.rb @@ -1,5 +1,5 @@ class Factory - module Syntax #:nodoc: + module Syntax # Extends ActiveRecord::Base to provide generation methods for factories. # diff --git a/lib/factory_girl/syntax/make.rb b/lib/factory_girl/syntax/make.rb index 2d0b1f0..1aea973 100644 --- a/lib/factory_girl/syntax/make.rb +++ b/lib/factory_girl/syntax/make.rb @@ -1,5 +1,5 @@ class Factory - module Syntax #:nodoc: + module Syntax # Extends ActiveRecord::Base to provide a make class method, which is a # shortcut for Factory.create. diff --git a/lib/factory_girl/syntax/sham.rb b/lib/factory_girl/syntax/sham.rb index 828ad79..69dd47b 100644 --- a/lib/factory_girl/syntax/sham.rb +++ b/lib/factory_girl/syntax/sham.rb @@ -1,5 +1,5 @@ class Factory - module Syntax #:nodoc: + module Syntax # Adds a Sham module, which provides an alternate interface to # Factory::Sequence.