class RSpec::Core::SharedExampleGroup::Registry
def add_group(source, *args, &block)
def add_group(source, *args, &block) ensure_block_has_source_location(block, caller[1]) if key? args.first key = args.shift warn_if_key_taken source, key, block add_shared_example_group source, key, block end unless args.empty? mod = Module.new (class << mod; self; end).send :define_method, :extended do |host| host.class_eval(&block) end RSpec.configuration.extend mod, *args end end