Skip to content

Commit

Permalink
Merge pull request #5059 from nebulab/kennyadsl/remove-factories-left…
Browse files Browse the repository at this point in the history
…over

Deprecate other code related to old factories loading
  • Loading branch information
kennyadsl authored Apr 28, 2023
2 parents afa58b4 + bf5b7aa commit daf1b10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/lib/spree/testing_support.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# frozen_string_literal: true

require 'spree/testing_support/factory_bot'
require 'spree/deprecation'

Spree::Deprecation.warn <<-WARN
Using `require 'spree/testing_support'` is deprecated and will be removed in
Solidus 4.0.
WARN

module Spree
module TestingSupport
Expand All @@ -11,5 +17,6 @@ module TestingSupport
def check_factory_bot_version
Spree::TestingSupport::FactoryBot.check_version
end
deprecate :check_factory_bot_version, deprecator: Spree::Deprecation
end
end
1 change: 1 addition & 0 deletions core/lib/spree/testing_support/factory_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def self.check_version
MSG
end
end
deprecate :check_version, deprecator: Spree::Deprecation

def self.add_definitions!
::FactoryBot.definition_file_paths.unshift(*definition_file_paths).uniq!
Expand Down

0 comments on commit daf1b10

Please sign in to comment.