Skip to content

Commit

Permalink
Merge pull request #45 from AlchemyCMS/fix-alchemy-factories
Browse files Browse the repository at this point in the history
Fix loading of alchemy factories
  • Loading branch information
tvdeyen authored Mar 2, 2021
2 parents 684474f + a07ee8b commit 29572b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
if Alchemy.gem_version >= Gem::Version.new("5.2.0")
require "alchemy/test_support"

FactoryBot.definition_file_paths.concat(Alchemy::TestSupport.factory_paths)
FactoryBot.reload
if Alchemy.gem_version >= Gem::Version.new("6.0.a")
FactoryBot.definition_file_paths.append(Alchemy::TestSupport.factories_path)
else
FactoryBot.definition_file_paths.concat(Alchemy::TestSupport.factory_paths)
end
FactoryBot.find_definitions
else
require "alchemy/test_support/factories"
end
Expand Down

0 comments on commit 29572b2

Please sign in to comment.