Sha256: c087192e9dd879a180a69c440277642848c6eaef4bc33fa56a059f3c738ee55a
Contents?: true
Size: 1016 Bytes
Versions: 14
Compression:
Stored size: 1016 Bytes
Contents
require "konacha/reporter/metadata" # The ExampleGroup class mimics the public interface of RSpec::Core::ExampleGroup. module Konacha class Reporter class ExampleGroup 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 groups << ancestor ancestor = ancestor.parent end groups end 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
Version data entries
14 entries across 14 versions & 1 rubygems