summaryrefslogtreecommitdiff
path: root/qa/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/spec_helper.rb')
-rw-r--r--qa/spec/spec_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb
index cbdd6e881b1..83ce4fa7378 100644
--- a/qa/spec/spec_helper.rb
+++ b/qa/spec/spec_helper.rb
@@ -1,13 +1,13 @@
-require_relative '../qa'
-require 'rspec/retry'
+require_relative "../qa"
+require "rspec/retry"
%w[helpers shared_examples].each do |d|
- Dir[::File.join(__dir__, d, '**', '*.rb')].each { |f| require f }
+ Dir[::File.join(__dir__, d, "**", "*.rb")].each { |f| require f }
end
RSpec.configure do |config|
config.before(:context) do
- if self.class.metadata.keys.include?(:quarantine)
+ if self.class.metadata.key?(:quarantine)
skip_or_run_quarantined_tests(self.class.metadata.keys, config.inclusion_filter.rules.keys)
end
end
@@ -40,7 +40,7 @@ RSpec.configure do |config|
config.display_try_failure_messages = true
config.around do |example|
- retry_times = example.metadata.keys.include?(:quarantine) ? 1 : 3
+ retry_times = example.metadata.key?(:quarantine) ? 1 : 3
example.run_with_retry retry: retry_times
end
end
@@ -63,7 +63,7 @@ def skip_or_run_quarantined_tests(metadata_keys, filter_keys)
if filter_keys.include?(:quarantine)
skip("Only running tests tagged with :quarantine and any of #{included_filters}") unless quarantine_and_optional_other_tag?(metadata_keys, included_filters)
else
- skip('In quarantine') if metadata_keys.include?(:quarantine)
+ skip("In quarantine") if metadata_keys.include?(:quarantine)
end
end