diff --git a/app/solidus_decorators/spree/image_decorator.rb b/app/solidus_decorators/spree/image_decorator.rb index 939d741..4dd3353 100644 --- a/app/solidus_decorators/spree/image_decorator.rb +++ b/app/solidus_decorators/spree/image_decorator.rb @@ -9,7 +9,7 @@ def mailchimp_sync SolidusMailchimpSync::ProductSynchronizer.new(self.viewable.product).auto_sync(force: true) else # image just on this variant, just need to sync this one. - SolidusMailchimpSync::VariantSynchronizer.new(self.variant).auto_sync(force: true) + SolidusMailchimpSync::VariantSynchronizer.new(self.viewable).auto_sync(force: true) end end end diff --git a/lib/solidus_mailchimp_sync/factories.rb b/lib/solidus_mailchimp_sync/factories.rb index 28b7517..53ab2a5 100644 --- a/lib/solidus_mailchimp_sync/factories.rb +++ b/lib/solidus_mailchimp_sync/factories.rb @@ -1,4 +1,4 @@ -FactoryGirl.define do +FactoryBot.define do # Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them. # # Example adding this to your spec_helper will load these Factories for use: @@ -6,7 +6,7 @@ end -FactoryGirl.modify do +FactoryBot.modify do factory :order do factory :order_with_line_items do # This custom factory is from Solidus master at: diff --git a/solidus_mailchimp_sync.gemspec b/solidus_mailchimp_sync.gemspec index fea97e1..63f71b8 100644 --- a/solidus_mailchimp_sync.gemspec +++ b/solidus_mailchimp_sync.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'coffee-rails', '~> 4.2' s.add_development_dependency 'sass-rails', '~> 5.0' s.add_development_dependency 'database_cleaner', '~> 1.5' - s.add_development_dependency 'factory_girl', '~> 4.7' + s.add_development_dependency 'factory_bot', '~> 4.11' s.add_development_dependency 'rspec-rails', '~> 3.5' s.add_development_dependency 'rubocop', '~> 0.44' s.add_development_dependency 'rubocop-rspec', '~> 1.8' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1458c70..0ece3aa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,6 @@ require 'rspec/rails' require 'database_cleaner' -require 'ffaker' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. @@ -58,7 +57,7 @@ end RSpec.configure do |config| - config.include FactoryGirl::Syntax::Methods + config.include FactoryBot::Syntax::Methods # Infer an example group's spec type from the file location. config.infer_spec_type_from_file_location!