Daniel Colson
5f1a1de114
Run standardrb
...
This commit applies the changes from running `standardrb --fix`
2020-06-10 17:11:39 -04:00
Alejandro Dustet
4d1cb6219b
Deprecate and move to Internal factories methods
...
Why:
These methods are used internally for the functionality of the library
and are subject to change. Therefore shouldn't be part of the public
interface.
This PR:
- Moves the ```register_factory``` and ```factory_by_name``` methods to
the ```FactoryBot::Internal``` class.
- Deprecates the use of ```register_factory``` and ```factory_by_name```
from the ```FactoryBot``` module.
- Improve formatting of the specs
2019-06-04 19:39:04 -04:00
Hunter Braun
89ee4a4524
[Rubocop] Style Cop Offenses ( #1208 )
2018-10-07 18:02:54 -04:00
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
Andrew Mason
95188e2e78
Switches mocking library to rspec
2017-07-14 17:25:47 +01:00
Joshua Clayton
b095f24598
Convert to expect syntax
2013-01-18 13:58:36 -05:00
Josh Clayton and Jason Draper
1325da5174
Move strategy calculation to Factory#run
2012-05-04 13:36:46 -04:00
Joshua Clayton
89d5e944d5
Refactor Strategies
...
This changes Strategy from a class to a module and removes inheritance.
It introduces an Evaluation facade to make building strategies easier
2012-04-13 17:20:02 -04:00
Joshua Clayton
7f5acac32c
Use a null strategy so association behaves in a similar way across all strategy subclasses
2012-03-30 17:30:20 -04:00
Joshua Clayton
6c29b11477
Use 1.9 hash syntax
2012-03-16 16:43:23 -04:00
Joshua Clayton
eca05c948f
Remove support for :method to define build strategy
2012-03-16 13:17:15 -04:00
Barun Singh
68ca50f4a6
fix FactoryRunner#run bug re: uncompiled factory
2012-03-09 14:18:02 -05:00
Joshua Clayton
4145a6e744
Replace AssociationRunner with more generic FactoryRunner
2012-03-02 17:11:00 -05:00
Joshua Clayton
791591bd58
Deprecate :method in favor of :strategy
2012-02-17 14:23:17 -05:00
Joshua Clayton
4dd67d1fb7
Move override handling into the evaluator
2012-02-10 18:19:18 -05:00
Joshua Clayton
7b2fbeac5c
Add AssociationRunner for running associations from strategies
...
This extracts logic for running factories based on name and either
strategy class, symbol representing a strategy, or nil (defaulting to
the create strategy)
2012-02-10 18:19:17 -05:00
Joshua Clayton
b79a525c09
Proxy => Strategy
2012-02-10 18:19:17 -05:00