class RSpec::Core::SharedExampleGroup::Registry

def legacy_add(context, name, *metadata_args, &block)

not want to support in RSpec 4.
the legacy behavior of shared context metadata, which we do
`config.shared_context_metadata_behavior == :trigger_inclusion`,
TODO: remove this in RSpec 4. This exists only to support
def legacy_add(context, name, *metadata_args, &block)
  ensure_block_has_source_location(block) { CallerFilter.first_non_rspec_line }
  shared_module = SharedExampleGroupModule.new(name, block, {})
  if valid_name?(name)
    warn_if_key_taken context, name, block
    shared_example_groups[context][name] = shared_module
  else
    metadata_args.unshift name
  end
  return if metadata_args.empty?
  RSpec.configuration.include shared_module, *metadata_args
end