djezzzl / factory_trace

Simple tool to maintain factories and traits from FactoryBot
MIT License
381 stars 7 forks source link

factory_bot deprecation warnings when running trace #16

Closed kuzmik closed 4 years ago

kuzmik commented 4 years ago

These warnings started showing up during my rspec runs (which calls trace):

DEPRECATION WARNING: register_factory is deprecated and will be removed from factory_bot 6.0 (called from block in <top (required)> at /Users/kuzmik/Development/project1/spec/factories/os_requirements.rb:22)
....
DEPRECATION WARNING: register_factory is deprecated and will be removed from factory_bot 6.0 (called from block in <top (required)> at /Users/kuzmik/Development/project1/spec/factories/requirements.rb:20)
DEPRECATION WARNING: traits is deprecated and will be removed from factory_bot 6.0 (called from load at /Users/kuzmik/.rbenv/versions/2.6.5/gemsets/bc-das/bin/rspec:23)

I tried giving the code a look to see if I could fix it and push a PR, but I came up short.

Rails 5.2.3

Gem versions (I don't THINK rspec is relevant, but hey why not include it):

factory_bot (5.1.1)
factory_bot_rails (5.1.1)
factory_trace (0.4.0)
rspec (3.8.0)
djezzzl commented 4 years ago

Hey, thank you for pointing this out 👍

It will be fixed today.

djezzzl commented 4 years ago

The PR was merged and new version will be released soon https://github.com/djezzzl/factory_trace/pull/17 👍

djezzzl commented 4 years ago

Please try latest version: 0.4.1. Should be fixed.

kuzmik commented 4 years ago

That did the trick, thank you sir!