Simplify parameter lookup in issues_finder_shared_examples.rb
What does this MR do and why?
Prior to Ruby 3.1, WorkItems::WorkItemsFinder::Params
would be
resolved to IssuesFinder::Params
.
However, with https://github.com/ruby/ruby/pull/4585 to fix
https://bugs.ruby-lang.org/issues/17887, Ruby 3.1 now resolves
WorkItems::WorksItemsFinder::Params
as EE::IssuesFinder::Params
.
However, since the latter is a prepended module, it does not have the
constants FILTER_NONE
or FILTER_ANY
. As a result, the test fails
with unintialized constant
errors in Ruby 3.1 and up.
Simplify the test to use IssuableFinder::Params
since we can use
a straightforward lookup that doesn't depend on the finder.
How to set up and validate locally
- Switch to Ruby 3.1 (e.g. edit
.tool-versions
to useruby 3.1.4
). - Run
bundle exec rspec spec/finders/work_items/work_items_finder_spec.rb
. Onmaster
, this test will fail - Check out this branch and repeat 2.
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.