From 53a8fec1818678e62ea1afae7e8e29f3f5539a25 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sun, 23 Aug 2020 13:25:32 +0100 Subject: [PATCH] Bring shipping_category factory from spree_core and merge with modification --- spec/factories.rb | 7 ------- spec/factories/shipping_category_factory.rb | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 spec/factories/shipping_category_factory.rb diff --git a/spec/factories.rb b/spec/factories.rb index de7cc38a07..3afc05f7c0 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -160,10 +160,3 @@ FactoryBot.define do stripe_publishable_key "xyz456" end end - -FactoryBot.modify do - factory :shipping_category, class: Spree::ShippingCategory do - initialize_with { DefaultShippingCategory.find_or_create } - transient { name 'Default' } - end -end diff --git a/spec/factories/shipping_category_factory.rb b/spec/factories/shipping_category_factory.rb new file mode 100644 index 0000000000..50c26a9905 --- /dev/null +++ b/spec/factories/shipping_category_factory.rb @@ -0,0 +1,7 @@ +FactoryGirl.define do + factory :shipping_category, class: Spree::ShippingCategory do + initialize_with { DefaultShippingCategory.find_or_create } + transient { name 'Default' } + sequence(:name) { |n| "ShippingCategory ##{n}" } + end +end