Commit fd4f7867 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-factorybot-ce' into 'master'

Move FactoryBot 4.x syntax config to CE

Closes #33203

See merge request gitlab-org/gitlab!18006
parents 2f9fef78 d78e2052
...@@ -6,9 +6,5 @@ RSpec.configure do |config| ...@@ -6,9 +6,5 @@ RSpec.configure do |config|
Rails.root.join('ee', 'spec', 'factories') Rails.root.join('ee', 'spec', 'factories')
] ]
FactoryBot.find_definitions FactoryBot.find_definitions
# Use FactoryBot 4.x behavior:
# https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#associations
FactoryBot.use_parent_strategy = false
end end
end end
...@@ -350,6 +350,10 @@ FactoryBot::SyntaxRunner.class_eval do ...@@ -350,6 +350,10 @@ FactoryBot::SyntaxRunner.class_eval do
include RSpec::Mocks::ExampleMethods include RSpec::Mocks::ExampleMethods
end end
# Use FactoryBot 4.x behavior:
# https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#associations
FactoryBot.use_parent_strategy = false
ActiveRecord::Migration.maintain_test_schema! ActiveRecord::Migration.maintain_test_schema!
Shoulda::Matchers.configure do |config| Shoulda::Matchers.configure do |config|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment