Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Unix instructions to upgrade guide from FactoryGirl to FactoryBot #1070

Conversation

roooodcastro
Copy link

The new 4.9.0 version issues a deprecation warning when I run my tests, and tell me to go to UPGRADE_FROM_FACTORY_GIRL.md to see how to upgrade.

This page contains an example grep + sed command to automatically do the job for you. However it didn't work for me running Ubuntu 16.04.

I then fixed the command to work on Unix and made this patch to add the unix example command.

@jbcden
Copy link

jbcden commented Nov 2, 2017

For what it's worth I also found that I had to use the fix here for macOS 10.12.5. The suggested returned no results.

@jbcden
Copy link

jbcden commented Nov 2, 2017

Actually just tweaked this again and managed to get the macOS version to work with:

grep -e FactoryBot **/**/*.rake **/**/*.rb -s -l

This seems to also work on Ubuntu 😄

@composerinteralia
Copy link
Collaborator

Thanks for this PR! The example we gave was really intended to be an example, not necessarily a perfect solution that would work for everyone. We have had lots of PRs suggesting alternatives (#1070, #1075, #1084, #1095, #1102), but to reduce churn on this file I have decided to close these issues. I appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants