Module: Memoria::RSpec::MetadataParser

Extended by:
MetadataParser
Included in:
MetadataParser
Defined in:
lib/memoria/rspec/metadata_parser.rb

Overview

Extracts information from RSpec's examples metadata.

Instance Method Summary collapse

Instance Method Details

#find_description_for(metadata) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Finds RSpec's description of a given example's metadata.

Parameters:

  • metadata (Hash)

    RSpec's metadata of a given example.

Returns:

  • (String)


15
16
17
18
19
20
21
22
23
24
# File 'lib/memoria/rspec/metadata_parser.rb', line 15

def find_description_for()
  description = find_description_in()
  example_group = find_example_group_in()

  if example_group
    [find_description_for(example_group), description].join('/')
  else
    description
  end
end