class RSpec::Core::ExampleGroup

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

Parameters:
  • implementation (Block) --
  • extra_options (Hash) --
  • name (String) --

Other tags:
    Private: -
def self.define_example_method(name, extra_options={})
  module_eval(<<-END_RUBY, __FILE__, __LINE__)
    def #{name}(desc=nil, *args, &block)
      options = build_metadata_hash_from(args)
      options.update(:pending => RSpec::Core::Pending::NOT_YET_IMPLEMENTED) unless block
      options.update(#{extra_options.inspect})
      examples << RSpec::Core::Example.new(self, desc, options, block)
      examples.last
    end
  END_RUBY
end