Joshua Clayton
dc32fd69e8
Change syntax for ignoring attributes to use block syntax instead of
...
calling ignore on individual declarations.
Old syntax:
factory :user do
rockstar(true).ignore
four { 2 + 2 }.ignore
name { "John Doe#{" - Rockstar" if rockstar}" }
end
New syntax:
factory :user do
ignore do
rockstar true
four { 2 + 2 }
end
name { "John Doe#{" - Rockstar" if rockstar}" }
end
2011-10-09 16:46:57 -04:00
Joe Ferris and Josh Clayton
a154e64da1
Introduce declarations
...
Declarations are another layer of abstraction between defining the
factories via the DSL and compiling the factories and their attributes.
Declarations know how to return their attribute(s), and running a
factory compiles the declarations before building all attributes on the
factory. This moves all the attribute compilation logic into one
centralized location on the Factory instance, which means traits (and
potentially other features down the road) can have individual attributes
overridden within child factories or through FactoryGirl.modify
Closes #205
2011-09-23 13:14:02 -04:00
Gabe Berke-Williams
67fc3bc8a9
Whitespace, textwidth, and escaping underscores.
2011-09-16 09:27:05 -04:00
Omar Vargas
6c30ae380e
Even more specific instructions for cucumber integration
2011-09-15 13:22:27 -05:00
Omar Vargas
677341b681
More specific instructions for cucumber integration
2011-09-15 12:00:47 -05:00
Joshua Clayton
370d8a6816
Update Getting Started to reflect recent version bumps
2011-09-06 11:36:51 -03:00
Gabe Berke-Williams
4d4b5d9cfd
typo
2011-09-06 11:30:42 -03:00
Gabe Berke-Williams
db82ccc74c
factory_girl_rails 1.1 isn't an RC
2011-09-06 11:30:21 -03:00
Joshua Clayton
661e8ffde5
Clarify factory modification in the context of traits
2011-09-02 14:53:09 -04:00
Stephan Eckardt and Josh Clayton
14b8245371
Allow factories to be modified after they've been defined.
...
This adds `FactoryGirl.modify`, which allows for reopening of factories
that've been defined elsewhere. Modifying a factory won't remove or
change callbacks, only attributes.
2011-09-02 12:05:44 -04:00
Joshua Clayton
63458eee46
Fix documentation to reference build_stubbed instead of stub
2011-09-01 19:22:41 -03:00
Gabe Berke-Williams
aadeb530ca
Fix formatting.
2011-08-29 21:17:09 -03:00
Mike Burns
79a1d5e135
Merge branch 'method-build2-0-5' of https://github.com/jkingdon/factory_girl
2011-08-26 09:19:02 -04:00
Jim Kingdon
90374818a7
Now able to specify :method => :build in a factory's association.
...
See issue #64 .
2011-08-25 15:11:01 -04:00
Petteri Räty
25affc7fec
Typo fix possbile to possible
2011-08-25 13:40:48 +03:00
Joshua Clayton
c87429b829
Add transient variables
...
Closes #142
Closes #103
2011-08-20 18:36:37 -04:00
Tom Stuart
8af12f0acf
Replace Factory.next with FactoryGirl.generate in Getting Started guide
2011-08-17 09:27:05 +02:00
Joshua Clayton
1c74d9d6ec
Rename attribute groups to traits
2011-08-12 16:24:58 -04:00
Joshua Clayton
86125a4448
Document attribute groups
2011-08-12 16:24:58 -04:00
Gabe Berke-Williams
49a47fa5de
Edited GETTING_STARTED.md via GitHub
2011-07-28 10:57:07 -03:00
Simon Hürlimann
8bd8e0c851
Update getting started documentation to drop release candidate versions in Gemfile.
2011-07-25 14:28:28 -07:00
Joshua Clayton
38a571db6e
Update getting started doc to outline updating gemfile
2011-07-04 09:49:09 -04:00
Joshua Clayton
9e1024bc52
More docs
2011-07-01 11:14:27 -04:00
Joshua Clayton
4d83729dc5
Documentation fixes
2011-07-01 11:07:02 -04:00
Joshua Clayton
0c0699759f
Allow child factories to be defined by nesting
2011-06-29 16:49:45 -04:00
Ben Orenstein
90ea1fe304
Copy edit GETTING_STARTED. Improve language, examples, and formatting.
2011-06-29 12:27:56 -04:00
Joshua Clayton
cbd42eda39
Whitespace
2011-06-29 11:47:14 -04:00
Colin Gemmell
dd7aa22e0d
Added create|build_list for easy generation of multiple factories at once
...
Closes #110
2011-06-28 16:02:05 -04:00
Joshua Clayton
71dacea387
Update the sequence documentation
...
Closes #135
2011-06-27 17:33:58 -04:00
Joe Ferris
3acd41d873
Extract examples out to a different file so that the readme people see on Github won't contact examples from master
2011-02-07 17:48:29 -05:00