2019-10-06 23:07:19 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-11-02 10:08:52 -05: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-28 20:08:36 -04:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2018-03-29 05:49:08 -04:00
|
|
|
require 'bundler/setup'
|
|
|
|
|
2018-04-10 10:07:47 -04:00
|
|
|
ENV['GITLAB_ENV'] = 'test'
|
|
|
|
ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true'
|
2018-03-29 05:49:08 -04:00
|
|
|
|
2019-06-13 08:18:01 -04:00
|
|
|
require 'active_support/dependencies'
|
2019-07-23 10:51:13 -04:00
|
|
|
require_relative '../config/initializers/0_inject_enterprise_edition_module'
|
2018-04-24 10:43:41 -04:00
|
|
|
require_relative '../config/settings'
|
2018-03-29 05:49:08 -04:00
|
|
|
require_relative 'support/rspec'
|
2018-05-11 07:28:26 -04:00
|
|
|
require 'active_support/all'
|
|
|
|
|
2020-03-18 20:09:27 -04:00
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'lib'
|
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'ee/lib'
|
2021-07-14 17:09:44 -04:00
|
|
|
ActiveSupport::Dependencies.autoload_paths << 'jh/lib'
|
2020-06-02 05:08:01 -04:00
|
|
|
|
2018-11-16 01:49:48 -05:00
|
|
|
ActiveSupport::XmlMini.backend = 'Nokogiri'
|
2021-06-17 05:09:53 -04:00
|
|
|
|
|
|
|
RSpec.configure do |config|
|
2021-06-29 11:07:48 -04:00
|
|
|
unless ENV['CI']
|
2021-06-30 11:08:27 -04:00
|
|
|
# Allow running `:focus` examples locally,
|
|
|
|
# falling back to all tests when there is no `:focus` example.
|
2021-06-29 11:07:48 -04:00
|
|
|
config.filter_run focus: true
|
|
|
|
config.run_all_when_everything_filtered = true
|
|
|
|
end
|
2021-06-17 05:09:53 -04:00
|
|
|
end
|