Sha256: 83c2a18a85e3ea8e01357847aee803830b46114df0306c27fc88b25c457f739a
Contents?: true
Size: 758 Bytes
Versions: 7
Compression:
Stored size: 758 Bytes
Contents
module Approvals module Namers class DirectoryNamer < RSpecNamer private def name_for_example(example) directorize example end def directorize(example) approvals_path = lambda do |metadata| description = normalize metadata[:description] example_group = if metadata.key?(:example_group) metadata[:example_group] else metadata[:parent_example_group] end if example_group [approvals_path[example_group], description].join('/') else description end end approvals_path[example.metadata] end end end end
Version data entries
7 entries across 7 versions & 2 rubygems