module RSpec::Core::SharedExampleGroup
def shared_context(*args, &block)
def shared_context(*args, &block) if String === args.first || Symbol === args.first name = args.shift ensure_shared_example_group_name_not_taken(name) RSpec.world.shared_example_groups[name] = 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) else end end