Class: TLDR::TestGroup

Inherits:
Struct
  • Object
show all
Defined in:
lib/tldr/value/test_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration

Returns:

  • (Object)

    the current value of configuration



2
3
4
# File 'lib/tldr/value/test_group.rb', line 2

def configuration
  @configuration
end

#testsObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/tldr/value/test_group.rb', line 5

def tests
  @tests ||= configuration.flat_map { |(klass, method)|
    klass = Kernel.const_get(klass) if klass.is_a?(String)
    if method.nil?
      ([klass] + ClassUtil.gather_descendants(klass)).flat_map { |klass|
        ClassUtil.gather_tests(klass)
      }
    else
      Test.new(klass, method)
    end
  }
end

Instance Method Details

#group?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/tldr/value/test_group.rb', line 18

def group?
  true
end