Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/specs/spec_helper.rb')
-rw-r--r--qa/qa/specs/spec_helper.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/qa/qa/specs/spec_helper.rb b/qa/qa/specs/spec_helper.rb
index 97901042883..a4721040683 100644
--- a/qa/qa/specs/spec_helper.rb
+++ b/qa/qa/specs/spec_helper.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require_relative '../../qa'
+require 'active_support/testing/time_helpers'
QA::Specs::QaDeprecationToolkitEnv.configure!
@@ -14,20 +15,18 @@ QA::Runtime::Scenario.from_env(QA::Runtime::Env.runtime_scenario_attributes)
# Enable zero monkey patching mode before loading any other RSpec code.
RSpec.configure(&:disable_monkey_patching!)
-Dir[::File.join(__dir__, "features/shared_examples/*.rb")].sort.each { |f| require f }
-Dir[::File.join(__dir__, "features/shared_contexts/*.rb")].sort.each { |f| require f }
-
# For JH additionally process when `jh/` exists
require_relative('../../../jh/qa/qa/specs/spec_helper') if GitlabEdition.jh?
RSpec.configure do |config|
+ config.include ActiveSupport::Testing::TimeHelpers
config.include QA::Support::Matchers::EventuallyMatcher
config.include QA::Support::Matchers::HaveMatcher
config.add_formatter QA::Support::Formatters::ContextFormatter
config.add_formatter QA::Support::Formatters::QuarantineFormatter
config.add_formatter QA::Support::Formatters::FeatureFlagFormatter
- config.add_formatter QA::Support::Formatters::TestStatsFormatter if QA::Runtime::Env.export_metrics?
+ config.add_formatter QA::Support::Formatters::TestMetricsFormatter if QA::Runtime::Env.running_in_ci?
config.before(:suite) do |suite|
QA::Resource::ReusableCollection.register_resource_classes do |collection|
@@ -149,3 +148,6 @@ RSpec.configure do |config|
end
end
end
+
+Dir[::File.join(__dir__, "features/shared_examples/**/*.rb")].sort.each { |f| require f }
+Dir[::File.join(__dir__, "features/shared_contexts/**/*.rb")].sort.each { |f| require f }