diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 21:11:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 21:11:55 +0300 |
commit | 2b2d833ab3e78f8c9f626af950a16d43fc38c9f8 (patch) | |
tree | 13c101679f3cda5808affea46709207a24f4a3c9 /spec/spec_helper.rb | |
parent | 7d8d5a3dab415672a41ab29c3bfa9581f275dc50 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 17f091278e5..2b3b7b114c8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -112,11 +112,11 @@ RSpec.configure do |config| # falling back to all tests when there is no `:focus` example. config.filter_run focus: true config.run_all_when_everything_filtered = true - - # Re-run failures locally with `--only-failures` - config.example_status_persistence_file_path = './spec/examples.txt' end + # Re-run failures locally with `--only-failures` + config.example_status_persistence_file_path = ENV.fetch('RSPEC_LAST_RUN_RESULTS_FILE', './spec/examples.txt') + config.define_derived_metadata(file_path: %r{(ee)?/spec/.+_spec\.rb\z}) do |metadata| location = metadata[:location] @@ -208,7 +208,9 @@ RSpec.configure do |config| config.exceptions_to_hard_fail = [DeprecationToolkitEnv::DeprecationBehaviors::SelectiveRaise::RaiseDisallowedDeprecation] end - if ENV['FLAKY_RSPEC_GENERATE_REPORT'] + require_relative '../tooling/rspec_flaky/config' + + if RspecFlaky::Config.generate_report? require_relative '../tooling/rspec_flaky/listener' config.reporter.register_listener( |