class RSpec::Core::ExampleGroup

def self.define_example_method(name, extra_options={})

Other tags:
    Yield: - the example object

Parameters:
  • example_implementation (Block) -- The implementation of the example.
  • metadata (Array, Hash) -- Metadata for the example.
  • doc_string (String) -- The example's doc string.
  • metadata (Array, Hash) -- Metadata for the example.
  • doc_string (String) -- The example's doc string.
  • example_implementation (Block) -- The implementation of the example.

Overloads:
  • $1(doc_string, *metadata, &example_implementation)
  • $1(doc_string, *metadata)
  • $1(&example_implementation)
  • $1

Other tags:
    Private: -
def self.define_example_method(name, extra_options={})
  idempotently_define_singleton_method(name) do |*all_args, &block|
    desc, *args = *all_args
    options = Metadata.build_hash_from(args)
    options.update(:skip => RSpec::Core::Pending::NOT_YET_IMPLEMENTED) unless block
    options.update(extra_options)
    RSpec::Core::Example.new(self, desc, options, block)
  end
end