-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
FactoryBot/FactoryAssociationWithStrategy false positive with keyword argument #73
Comments
How does this work? Is it really transient? https://github.com/thoughtbot/factory_bot/blob/main/GETTING_STARTED.md#with-associations You could still refer to ‘location’ if you used ‘association’ instead of ‘build’, right? With this in mind, can this be written as: FactoryBot.define do
factory :holding do
location factory: :gre_stacks
item { association(:item, :available, location:) }
end ? |
@pirj item is not really a property of holding, it's a transient that is later used by |
I see. Thanks for reporting. Might be a duplicate of #61, but not necessarily. |
This cop needs to be fixed not to bark inside transient blocks |
A PR is welcome, @Abdullah-l |
I don't think there is another way to write this given that location references another transient:
The text was updated successfully, but these errors were encountered: