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

Fix factory loading #2041

Merged
merged 2 commits into from Mar 2, 2021
Merged

Fix factory loading #2041

merged 2 commits into from Mar 2, 2021

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Mar 2, 2021

What is this pull request for?

Before the method returned a list of individual file paths. FactoryBot is able to load files from a directory. By changing this to factories_path and return a single directory path it is easier to prepend and append the path to the list of factory bots factory definitions.

Also FactoryBot.reload is wrong as it resets the internal configs of factory bot.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

Before the method returned a list of individual file paths.
FactoryBot is able to load files from a directory. By changing
this to factories_path and return a single directory path it
is easier to prepend and append the path to the list of factory
bots factory definitions.
Our factories now get appended to the definition paths of factory bot.

Also FactoryBot.reload is wrong as it resets the internal configs of factory bot
@tvdeyen tvdeyen requested a review from mamhoff March 2, 2021 11:04
@tvdeyen tvdeyen added this to the 6.0 milestone Mar 2, 2021
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tvdeyen tvdeyen merged commit ecc90c8 into AlchemyCMS:main Mar 2, 2021
@tvdeyen tvdeyen deleted the fix-factory-loading branch March 2, 2021 11:44
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.

None yet

2 participants