2019-10-07 03:07:19 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-11-02 15:08:52 +00:00
|
|
|
# $" is $LOADED_FEATURES, but RuboCop didn't like it
|
|
|
|
if $".include?(File.expand_path('spec_helper.rb', __dir__))
|
|
|
|
# There's no need to load anything here if spec_helper is already loaded
|
|
|
|
# because spec_helper is more extensive than fast_spec_helper
|
2020-10-29 00:08:36 +00:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2021-09-03 12:09:03 +00:00
|
|
|
require_relative '../config/bundler_setup'
|
2018-03-29 09:49:08 +00:00
|
|
|
|
2018-04-10 14:07:47 +00:00
|
|
|
ENV['GITLAB_ENV'] = 'test'
|
|
|
|
ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true'
|
2018-03-29 09:49:08 +00:00
|
|
|
|
2019-06-13 12:18:01 +00:00
|
|
|
require 'active_support/dependencies'
|
2019-07-23 14:51:13 +00:00
|
|
|
require_relative '../config/initializers/0_inject_enterprise_edition_module'
|
2018-04-24 14:43:41 +00:00
|
|
|
require_relative '../config/settings'
|
2018-03-29 09:49:08 +00:00
|
|
|
require_relative 'support/rspec'
|
2018-05-11 11:28:26 +00:00
|
|
|
require 'active_support/all'
|
|
|
|
|
2022-03-10 03:08:56 +00:00
|
|
|
require_relative 'simplecov_env'
|
|
|
|
SimpleCovEnv.start!
|
|
|
|
|
2021-08-13 18:09:11 +00:00
|
|
|
unless ActiveSupport::Dependencies.autoload_paths.frozen?
|
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'lib'
|
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'ee/lib'
|
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'jh/lib'
|
|
|
|
end
|
2020-06-02 09:08:01 +00:00
|
|
|
|
2018-11-16 06:49:48 +00:00
|
|
|
ActiveSupport::XmlMini.backend = 'Nokogiri'
|
2021-06-17 09:09:53 +00:00
|
|
|
|
|
|
|
RSpec.configure do |config|
|
2021-06-29 15:07:48 +00:00
|
|
|
unless ENV['CI']
|
2021-06-30 15:08:27 +00:00
|
|
|
# Allow running `:focus` examples locally,
|
|
|
|
# falling back to all tests when there is no `:focus` example.
|
2021-06-29 15:07:48 +00:00
|
|
|
config.filter_run focus: true
|
|
|
|
config.run_all_when_everything_filtered = true
|
|
|
|
end
|
2021-06-17 09:09:53 +00:00
|
|
|
end
|