class Inferno::Entities::TestGroup

Public Class Methods

default_id() click to toggle source
# File lib/inferno/entities/test_group.rb, line 70
def default_id
  return name if name.present?

  suffix = parent ? (parent.groups.find_index(self) + 1).to_s.rjust(2, '0') : SecureRandom.uuid
  "Group#{suffix}"
end
group(...) click to toggle source

Methods to configure Inferno::DSL::Runnable

# File lib/inferno/entities/test_group.rb, line 44
def group(...)
  child_metadata(group_metadata)
  define_child(...)
end
group_metadata() click to toggle source
# File lib/inferno/entities/test_group.rb, line 54
def group_metadata
  {
    class: TestGroup,
    repo: repository,
    collection: groups
  }
end
groups() click to toggle source
# File lib/inferno/entities/test_group.rb, line 34
def groups
  @groups ||= []
end
reference_hash() click to toggle source
# File lib/inferno/entities/test_group.rb, line 77
def reference_hash
  {
    test_group_id: id
  }
end
repository() click to toggle source
# File lib/inferno/entities/test_group.rb, line 30
def repository
  Inferno::Repositories::TestGroups.new
end
test(...) click to toggle source
# File lib/inferno/entities/test_group.rb, line 49
def test(...)
  child_metadata(test_metadata)
  define_child(...)
end
test_metadata() click to toggle source
# File lib/inferno/entities/test_group.rb, line 62
def test_metadata
  {
    class: Test,
    repo: Inferno::Repositories::Tests.new,
    collection: tests
  }
end
tests() click to toggle source
# File lib/inferno/entities/test_group.rb, line 38
def tests
  @tests ||= []
end

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/inferno/entities/test_group.rb, line 16
def method_missing(name, *args, &block)
  parent_instance = self.class.parent&.new
  if parent_instance.respond_to?(name)
    parent_instance.send(name, *args, &block)
  else
    super
  end
end
respond_to_missing?(name, _include_private = false) click to toggle source
# File lib/inferno/entities/test_group.rb, line 25
def respond_to_missing?(name, _include_private = false)
  self.class.parent&.new&.respond_to?(name)
end