Extract `where` into shared context for search helper spec
What does this MR do and why?
Defining where
in a different scope/example group as with_them
won't
run any examples.
Contributes to #430870.
How to set up and validate locally
- Apply the following patch and
bundle
:
diff --git a/Gemfile b/Gemfile
index 1536fa6bafec..c3bd4ce91b30 100644
--- a/Gemfile
+++ b/Gemfile
@@ -475,6 +475,8 @@ group :test do
gem 'rspec_profiling', '~> 0.0.6', feature_category: :tooling
gem 'rspec-benchmark', '~> 0.6.0', feature_category: :tooling
gem 'rspec-parameterized', '~> 1.0', require: false, feature_category: :tooling
+ gem 'rspec-parameterized-core', '~> 1.0', require: false, feature_category: :tooling,
+ git: 'https://github.com/splattael/rspec-parameterized-core', ref: 'warnings'
gem 'capybara', '~> 3.39', '>= 3.39.2' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'capybara-screenshot', '~> 1.0.26' # rubocop:todo Gemfile/MissingFeatureCategory
bin/rspec --dry-run spec/helpers/search_helper_spec.rb -e search_service
- Verify that related examples are present/printed
- Verify the absence of
All examples were filtered out; ignoring {:full_description=>/search_service/}
- Verify the absence of
spec/helpers/search_helper_spec.rb:814: "where" not defined.
warnings.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen