class RSpec::Core::Example
def initialize(example_group_class, description, user_metadata, example_block=nil)
- Api: - private
Parameters:
-
example_block
(Proc
) -- the block of code that represents the example -
user_metadata
(Hash
) -- additional args passed to `it` to be used as metadata -
description
(String
) -- the String passed to the `it` method (or alias) -
example_group_class
(Class
) -- the subclass of ExampleGroup in which this Example is declared
def initialize(example_group_class, description, user_metadata, example_block=nil) @example_group_class = example_group_class @example_block = example_block @metadata = Metadata::ExampleHash.create( @example_group_class.metadata, user_metadata, description, example_block ) @example_group_instance = @exception = nil @clock = RSpec::Core::Time end