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

5 commits

Author SHA1 Message Date
Avielle
c716ce01b4 Replace 'girl' with 'bot' everywhere (#1051)
Also: add a deprecation warning to factory_girl, asking users to switch to
factory_bot

https://github.com/thoughtbot/factory_girl/issues/921
2017-10-20 15:20:28 -04:00
Joshua Clayton
6a692fe711 Add FactoryGirl.lint to ensure all factories are valid
This commit adds FactoryGirl.lint, which iterates over each defined
factory, builds it, and ensures it is valid. If any factories are
invalid, an exception is raised and includes the names of each invalid
factory.
2014-02-07 22:21:08 -05:00
Joshua Clayton
fa9a81c166 Raise if a method is defined with a FactoryGirl block (factory or trait)
This resolves an issue where users have defined methods inside factory
girl blocks. This hasn't worked in quite a while and without raising,
users would be able to define methods and see an odd error (a
NoMethodError for `singleton_method_added=`). Instead, we raise
immediately so that no issues come up later when they actually try to
use the factories.

Closes #513
2013-04-26 16:10:19 -04:00
Joshua Clayton
6fe00e76c1 Deprecate the vintage syntax 2012-03-16 16:43:23 -04:00
Joshua Clayton
98626c9c73 Move errors to separate file 2012-02-08 09:45:07 -05:00