2019-10-06 23:07:19 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-14 17:09:20 -04:00
|
|
|
if $LOADED_FEATURES.include?(File.expand_path('spec_helper.rb', __dir__))
|
2020-11-02 10:08:52 -05:00
|
|
|
# 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
|
|
|
|
|
2021-09-03 08:09:03 -04:00
|
|
|
require_relative '../config/bundler_setup'
|
2018-03-29 05:49:08 -04:00
|
|
|
|
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
|
|
|
|
2022-08-18 11:12:17 -04:00
|
|
|
# Enable zero monkey patching mode before loading any other RSpec code.
|
|
|
|
RSpec.configure(&:disable_monkey_patching!)
|
|
|
|
|
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'
|
|
|
|
|
2022-03-09 22:08:56 -05:00
|
|
|
require_relative 'simplecov_env'
|
|
|
|
SimpleCovEnv.start!
|
|
|
|
|
2021-08-13 14:09:11 -04: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 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|
|
2022-06-04 17:08:30 -04:00
|
|
|
# Makes diffs show entire non-truncated values.
|
|
|
|
config.before(:each, unlimited_max_formatted_output_length: true) do |_example|
|
|
|
|
config.expect_with :rspec do |c|
|
|
|
|
c.max_formatted_output_length = nil
|
|
|
|
end
|
|
|
|
end
|
2021-06-17 05:09:53 -04:00
|
|
|
end
|