mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
Added intro documentation for syntaxes
This commit is contained in:
parent
6aa594fcde
commit
f28dad48c4
5 changed files with 16 additions and 4 deletions
12
lib/factory_girl/syntax.rb
Normal file
12
lib/factory_girl/syntax.rb
Normal file
|
@ -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
|
|
@ -1,5 +1,5 @@
|
||||||
class Factory
|
class Factory
|
||||||
module Syntax #:nodoc:
|
module Syntax
|
||||||
|
|
||||||
# Extends ActiveRecord::Base to provide a make class method, which is an
|
# Extends ActiveRecord::Base to provide a make class method, which is an
|
||||||
# alternate syntax for defining factories.
|
# alternate syntax for defining factories.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Factory
|
class Factory
|
||||||
module Syntax #:nodoc:
|
module Syntax
|
||||||
|
|
||||||
# Extends ActiveRecord::Base to provide generation methods for factories.
|
# Extends ActiveRecord::Base to provide generation methods for factories.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Factory
|
class Factory
|
||||||
module Syntax #:nodoc:
|
module Syntax
|
||||||
|
|
||||||
# Extends ActiveRecord::Base to provide a make class method, which is a
|
# Extends ActiveRecord::Base to provide a make class method, which is a
|
||||||
# shortcut for Factory.create.
|
# shortcut for Factory.create.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Factory
|
class Factory
|
||||||
module Syntax #:nodoc:
|
module Syntax
|
||||||
|
|
||||||
# Adds a Sham module, which provides an alternate interface to
|
# Adds a Sham module, which provides an alternate interface to
|
||||||
# Factory::Sequence.
|
# Factory::Sequence.
|
||||||
|
|
Loading…
Reference in a new issue