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

4 commits

Author SHA1 Message Date
Aqualon
893eb67bbb
Use match? in FactoryBot#aliases_for to save allocations (#1457)
FactoryBot relies on ruby >= 2.5, so we can use Regexp#match? that does not allocate MatchData

Allocations measured with heap-profiler gem in an internal test suite with 7497 examples and 149470 calls to aliases_for:

allocated memory by file
-----------------------------------
    59.79 MB  factory_bot-6.1.0/lib/factory_bot/aliases.rb
    38.27 MB  factory_bot-6.1.0/lib/factory_bot/aliases.rb

allocated objects by file
-----------------------------------
    896880  factory_bot-6.1.0/lib/factory_bot/aliases.rb
    597940  factory_bot-6.1.0/lib/factory_bot/aliases.rb
2021-09-09 21:43:47 -04:00
Daniel Colson
5f1a1de114 Run standardrb
This commit applies the changes from running `standardrb --fix`
2020-06-10 17:11:39 -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
Renamed from lib/factory_girl/aliases.rb (Browse further)