1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
Commit graph

25 commits

Author SHA1 Message Date
Joshua Clayton
0c0699759f Allow child factories to be defined by nesting 2011-06-29 16:49:45 -04:00
Joshua Clayton
4d8d419375 Don't require a block to be passed when defining a factory 2011-06-29 14:43:20 -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
Robert Lowe
2ba2dc1c15 Add new machinist make and make! syntax
*This commit is not backwards-compatible* as it breaks existing use of
make (which currently creates instead of builds)
2011-06-28 14:41:18 -04:00
Joe Ferris
c59981de1b Split factories/sequences into separate registries most of the time;
Only use factories from step definitions
2011-05-25 20:08:59 -04:00
Joe Ferris
5aea0f4096 Use a registry class for keeping factories and sequences. Treat
sequences largely like factories. Refactor name and aliases into a
common names method.
2011-01-27 20:15:33 -05:00
Nate Smith
0946f6d4bb Sequences without blocks return sequential numbers 2011-01-27 16:25:31 -05:00
Joe Ferris
a7f7e85187 Updated docs and examples for new syntax 2011-01-26 20:55:06 -05:00
Joe Ferris
6c2322a11d New default syntax for using defined factories 2011-01-26 20:44:24 -05:00
Joe Ferris
18c562a1e6 Added 'to_create' to factory definitions, allowing a factory to use something besides #save! 2011-01-19 18:19:30 -05:00
Joe Ferris
2d1c77984b Split up the acceptance spec; removed the acceptance model fixtures in favor of fresh definitions in each spec 2010-11-12 14:58:25 -06:00
Joe Ferris
ef29139e3e Moved aliases out of the definition body into the definition arguments 2010-11-11 16:34:01 -06:00
Joe Ferris
6b0b3ce748 Use appraisal for testing across ActiveRecord versions 2010-11-11 15:23:15 -06:00
Joe Ferris
5c88bb058b Renamed Factory#factory_name to Factory#name; cleaned up Factory#human_name; bumped version 2010-10-02 00:07:54 -04:00
Joe Ferris
b15fdc1b04 Removed some todos 2010-10-01 18:24:41 -04:00
Joe Ferris
3e08d6f159 Attributes without arguments/blocks look for a sequence 2010-10-01 18:11:24 -04:00
Joe Ferris
58ee31b91a Evaulate dynamic attribute blocks without arguments in the context of the proxy 2010-09-30 23:35:24 -04:00
Joe Ferris
3bdd6a3eff Added factory aliases 2010-09-07 19:20:02 -04:00
Joe Ferris
c7bb677777 Build an association without arguments in a definition proxy 2010-09-07 18:36:40 -04:00
Joe Ferris
bf0b6a6c16 Added a new definition syntax using instance_eval 2010-09-07 18:36:40 -04:00
Comron Sattari
84e2c1cf8c Allow sequences to iterate over non Integers 2010-08-12 19:42:18 -07:00
Joe Ferris
8b4a6a1c3a Moved definition loading syntax out of the factory class; moved everything into a FactoryGirl module 2010-07-06 20:22:02 -04:00
Joe Ferris
2a39afe527 Changed internal methods to use the internal api 2010-07-06 20:22:02 -04:00
Joe Ferris
ac8875c818 Extracted yielded object for dsl into a proxy; moved default public api into its own file 2010-07-06 20:21:52 -04:00
Joe Ferris
f3366b69f2 Separated unit and acceptance tests to isolate Rails-related dependencies 2010-06-10 13:37:51 -04:00