debian-mirror-gitlab/spec/fast_spec_helper.rb

37 lines
1.1 KiB
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2021-01-29 00:20:46 +05:30
# $" 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
return
end
2021-11-11 11:23:49 +05:30
require_relative '../config/bundler_setup'
2018-10-15 14:42:47 +05:30
ENV['GITLAB_ENV'] = 'test'
ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true'
2019-09-30 21:07:59 +05:30
require 'active_support/dependencies'
2019-10-12 21:52:04 +05:30
require_relative '../config/initializers/0_inject_enterprise_edition_module'
2018-10-15 14:42:47 +05:30
require_relative '../config/settings'
require_relative 'support/rspec'
2018-11-08 19:23:39 +05:30
require 'active_support/all'
2021-10-27 15:23:28 +05:30
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-23 00:09:42 +05:30
2019-02-15 15:39:39 +05:30
ActiveSupport::XmlMini.backend = 'Nokogiri'
2021-09-30 23:02:18 +05:30
RSpec.configure do |config|
unless ENV['CI']
# Allow running `:focus` examples locally,
# falling back to all tests when there is no `:focus` example.
config.filter_run focus: true
config.run_all_when_everything_filtered = true
end
end