You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
factory:worddoletters{"bar"}type{"noun"}trait:articledotype{:article}endfactory:thedoarticle# association or a trait?letters{"the"}end
Unless we parse traits in context, it's hard to understand if article is an association or a trait.
With factory :verb, parent: :word placed in a separate file, this is getting impossible.
The text was updated successfully, but these errors were encountered:
pirj
changed the title
FactoryBot traits style
FactoryBot trait usage style in nested factories
Oct 23, 2022
pirj
changed the title
FactoryBot trait usage style in nested factories
Cop idea: FactoryBot trait usage style in nested factories
Oct 23, 2022
ydah
transferred this issue from rubocop/rubocop-rspec
May 6, 2023
Traits can be used in nested factories in two different ways.
Explicitly (and unambiguously):
Another way, as implicit attributes is ambiguous:
Unless we parse traits in context, it's hard to understand if
article
is an association or a trait.With
factory :verb, parent: :word
placed in a separate file, this is getting impossible.The text was updated successfully, but these errors were encountered: