Skip to content

Explicitly support kwargs in shared example groups

gitlab-qa-bot requested to merge github/fork/kddnewton/example-group-kwargs into master

Created by: kddnewton

Since the introduction of Ruby 2.7, positional and keyword argument separation is required, otherwise it warns: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

This patch allows RSpec to use kwargs explicitly with shared context, as in:

RSpec.shared_examples "shared context" do |foo:|

Merge request reports