diff --git a/spec/factories.rb b/spec/factories.rb index 9accd0c00c..8337e48a0c 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -162,11 +162,6 @@ FactoryBot.define do end FactoryBot.modify do - factory :option_type do - # Prevent inconsistent ordering in specs when all option types have the same (0) position - sequence(:position) - end - factory :stock_location, class: Spree::StockLocation do # keeps the test stock_location unique initialize_with { DefaultStockLocation.find_or_create } diff --git a/spec/factories/options_factory.rb b/spec/factories/options_factory.rb new file mode 100644 index 0000000000..5e5464090c --- /dev/null +++ b/spec/factories/options_factory.rb @@ -0,0 +1,15 @@ +FactoryGirl.define do + factory :option_value, class: Spree::OptionValue do + name 'Size' + presentation 'S' + option_type + end + + factory :option_type, class: Spree::OptionType do + name 'foo-size' + presentation 'Size' + + # Prevent inconsistent ordering in specs when all option types have the same (0) position + sequence(:position) + end +end