Class Index [+]

Quicksearch

RSpec::Core::SharedExampleGroup

Public Instance Methods

shared_examples(*args, &block) click to toggle source

@overload shared_examples(name, &block) @overload shared_examples(name, tags, &block)

Creates and stores (but does not evaluate) the block.

@see ExampleGroup.include_examples @see ExampleGroup.include_context

    # File lib/rspec/core/shared_example_group.rb, line 12
12:       def shared_examples(*args, &block)
13:         if [String, Symbol, Module].any? {|cls| cls === args.first }
14:           object = args.shift
15:           ensure_shared_example_group_name_not_taken(object)
16:           RSpec.world.shared_example_groups[object] = block
17:         end
18: 
19:         unless args.empty?
20:           mod = Module.new
21:           (class << mod; self; end).send(:define_method, :extended) do |host|
22:             host.class_eval(&block)
23:           end
24:           RSpec.configuration.extend(mod, *args)
25:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.