class RSpec::Core::Example

def initialize(example_group_class, description, metadata, example_block=nil)

Parameters:
  • example_block () -- the block of code that represents the example
  • metadata () -- additional args passed to `it` to be used as metadata
  • description () -- the String passed to the `it` method (or alias)
  • example_group_class () -- the subclass of ExampleGroup in which this Example is declared
def initialize(example_group_class, description, metadata, example_block=nil)
  @example_group_class, @options, @example_block = example_group_class, metadata, example_block
  @metadata  = @example_group_class.metadata.for_example(description, metadata)
  @exception = nil
  @pending_declared_in_example = false
end