Skip to content

Adapt some tests to pass both in Ruby 3.1 and Ruby 3.2

Igor Drozdov requested to merge fix-some-ruby-3-2-tests into master

What does this MR do and why?

  • Avoid using predicate matcher in helper specs
    • It doesn't work due to a bug in Rails' ActionView, so it can't be used for now. Even though the PR has been merged: https://github.com/rails/rails/pull/48667, it will require some time to get it to GitLab Rails
  • Accept only strings for hex color helpers
    • The following code raises NoMethodError now instead or nil:
      [] =~ /regex/
      1 =~ /regex/
  • Modify regexp in specs to match error messages in Ruby 3.1 and 3.2
  • Propagate kwarg correctly for pipeline_cleanup_ref_worker_spec

Merge request reports