module RSpec::Core::SharedExampleGroup
def shared_context(*args, &block)
def shared_context(*args, &block) if [String, Symbol, Module].any? {|cls| cls === args.first } object = args.shift ensure_shared_example_group_name_not_taken(object) RSpec.world.shared_example_groups[object] = 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