I ran into a problem this morning where I was getting some errors about factories being defined twice. I then noticed that most of the factories are defined both in lib/solidus_flexi_variants/factories.rb and in individual files under spec/factories. I don't know if this is a recent change in factory_bot or a convention with which I'm not familiar (I am used to looking for one factories file in a gem).
Not sure how this came about. My vote is for spec/factories to live on and to drop the ones under lib. Doesn't really make much sense to have code for testing co-mingled with the functional code.
I ran into a problem this morning where I was getting some errors about factories being defined twice. I then noticed that most of the factories are defined both in
lib/solidus_flexi_variants/factories.rb
and in individual files underspec/factories
. I don't know if this is a recent change in factory_bot or a convention with which I'm not familiar (I am used to looking for one factories file in a gem).I am happy to remove one set or the other.