lib/konacha/reporter/example_group.rb in konacha-3.0.0 vs lib/konacha/reporter/example_group.rb in konacha-3.1.0

- old
+ new

@@ -8,15 +8,19 @@ attr_reader :metadata, :parent def initialize(data, parent) @metadata = Metadata.new(data) @parent = parent + if parent + update_metadata(example_group: parent.metadata) + end end delegate :full_description, :description, :file_path, :described_class, :to => :metadata alias_method :display_name, :description + alias_method :example_group, :parent def parent_groups ancestor = parent groups = [] while ancestor @@ -29,9 +33,13 @@ alias_method :ancestors, :parent_groups def update_metadata(data) metadata.update(data) + end + + def [](key) + respond_to?(key) ? send(key) : metadata[key] end end end end