Skip to content

Fix `define_derived_metadata` so that it supports cascades.

gitlab-qa-bot requested to merge myron/fix-define-derived-metadata-cascades into master

Created by: myronmarston

For example:

RSpec.configure do |c|
  c.define_derived_metadata(:elasticsearch) do |meta|
    meta[:vcr] = true
  end

  c.define_derived_metadata(:vcr) do |meta|
    meta[:retries] = 2
  end
end

With this configuration, an example or group tagged with :elasticsearch should get tagged with :vcr as well, which in turn should add retries: 2 metadata to the example or group. Before this change, this did not work properly, because we did look to see if additional metadata blocks should apply after applying them once.

Merge request reports