diff --git a/spec/factories/credit_card_factory.rb b/spec/factories/credit_card_factory.rb index b09c44b6ce..72fde1c179 100644 --- a/spec/factories/credit_card_factory.rb +++ b/spec/factories/credit_card_factory.rb @@ -3,7 +3,7 @@ class TestCard < Spree::CreditCard def remove_readonly_attributes(attributes) attributes; end end -FactoryGirl.define do +FactoryBot.define do factory :credit_card, class: TestCard do verification_value 123 month 12 diff --git a/spec/factories/options_factory.rb b/spec/factories/options_factory.rb index 5e5464090c..be425474b7 100644 --- a/spec/factories/options_factory.rb +++ b/spec/factories/options_factory.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :option_value, class: Spree::OptionValue do name 'Size' presentation 'S' diff --git a/spec/factories/order_factory.rb b/spec/factories/order_factory.rb index 282d4772c1..984e93531c 100644 --- a/spec/factories/order_factory.rb +++ b/spec/factories/order_factory.rb @@ -108,7 +108,7 @@ FactoryBot.modify do trait :with_line_item do transient do - variant { FactoryGirl.create(:variant) } + variant { FactoryBot.create(:variant) } end after(:create) do |order, evaluator| diff --git a/spec/factories/payment_factory.rb b/spec/factories/payment_factory.rb index 267f63a7af..40d02a8654 100644 --- a/spec/factories/payment_factory.rb +++ b/spec/factories/payment_factory.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :payment, class: Spree::Payment do transient do distributor { diff --git a/spec/factories/payment_method_factory.rb b/spec/factories/payment_method_factory.rb index b957f2a56e..0db3fa4732 100644 --- a/spec/factories/payment_method_factory.rb +++ b/spec/factories/payment_method_factory.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :payment_method, class: Spree::PaymentMethod::Check do name 'Check' environment 'test' diff --git a/spec/factories/shipping_category_factory.rb b/spec/factories/shipping_category_factory.rb index 50c26a9905..7f676f9027 100644 --- a/spec/factories/shipping_category_factory.rb +++ b/spec/factories/shipping_category_factory.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :shipping_category, class: Spree::ShippingCategory do initialize_with { DefaultShippingCategory.find_or_create } transient { name 'Default' } diff --git a/spec/factories/stock_location_factory.rb b/spec/factories/stock_location_factory.rb index 4a37ff9a5d..46cd0a2f4a 100644 --- a/spec/factories/stock_location_factory.rb +++ b/spec/factories/stock_location_factory.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do factory :stock_location, class: Spree::StockLocation do # Ensures the name attribute is not assigned after instantiating the default location transient { name 'default' } diff --git a/spec/models/spree/order/checkout_spec.rb b/spec/models/spree/order/checkout_spec.rb index 5f49792aa2..1020fb0fe5 100644 --- a/spec/models/spree/order/checkout_spec.rb +++ b/spec/models/spree/order/checkout_spec.rb @@ -63,7 +63,7 @@ describe Spree::Order do end it "transitions to address" do - order.line_items << FactoryGirl.create(:line_item) + order.line_items << FactoryBot.create(:line_item) order.email = "user@example.com" order.next! expect(order.state).to eq "address"