FactoryGirl.create deprecation warning

I was curious why I'm getting a deprecation warning message in the inspections for FactoryGirl.create. According to the factory girl documentation:

https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md

that syntax is suggested.

In RubyMine, it shows a line through the call and the inspection says "        'FactoryGirl::Syntax::Vintage::Factory.create' call is deprecated in Rails      3.0"

Also, in the warning message, it would be helpful if there could be a hint about what the new syntax, like "use XXXX instead."

4 comments
Comment actions Permalink

Yup yup, but only happens on a new version of FactoryGirl gem.

I had an old project with an old FactoryGirl version and it doesn't show the deprecation warning.

With the last version, 3.3.0 (iirc) it shows that deprecation.

I got crazy, I went to google, tried "Factory.create" and when I ran the specs, I saw a deprecation warning about "Factory.create" and it told me to use "FactoryGirl.create" and that the IDE marks as deprecated.

In short, Rubymine is doing it wrong :p

0
Comment actions Permalink

could you, please, file a bug in  our bugtracker about this problem.

0
Comment actions Permalink

Sure, I will do it right now.

EDIT: Already exists :)

0

Please sign in to leave a comment.