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

Fix Spinach setup

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent b35084f8
...@@ -26,17 +26,24 @@ Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file } ...@@ -26,17 +26,24 @@ Dir["#{Rails.root}/features/steps/shared/*.rb"].each { |file| require file }
Spinach.hooks.before_run do Spinach.hooks.before_run do
include RSpec::Mocks::ExampleMethods include RSpec::Mocks::ExampleMethods
include ActiveJob::TestHelper include ActiveJob::TestHelper
include FactoryBot::Syntax::Methods
include GitlabRoutingHelper
RSpec::Mocks.setup RSpec::Mocks.setup
TestEnv.init(mailer: false) TestEnv.init(mailer: false)
# EE-specific START
FactoryBot.definition_file_paths = [
Rails.root.join('ee', 'spec', 'factories')
]
FactoryBot.find_definitions
License.destroy_all License.destroy_all
TestLicense.init TestLicense.init
# EE-specific END
# skip pre-receive hook check so we can use # skip pre-receive hook check so we can use
# web editor and merge # web editor and merge
TestEnv.disable_pre_receive TestEnv.disable_pre_receive
include FactoryBot::Syntax::Methods
include GitlabRoutingHelper
end end
Spinach.hooks.after_scenario do |scenario_data, step_definitions| Spinach.hooks.after_scenario do |scenario_data, step_definitions|
......
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