Class: SingleTestClassSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_minitest_analyzer/single_test_class_summary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass:, runnable_tests_count:, class_descendant_count:, extra_tests_executions_count:, subclasses:) ⇒ SingleTestClassSummary

klass -> The test class analyzed runnable_tests_count -> The number of tests methods within the class. class_descendant_count -> The number of extra runs of the whole test class (AKA as the number of descendants). extra_tests_execution_run -> The number of tests that run extra. E.G.



9
10
11
12
13
14
15
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 9

def initialize(klass:, runnable_tests_count:, class_descendant_count:, extra_tests_executions_count:, subclasses:)
  @klass = klass
  @runnable_tests_count = runnable_tests_count
  @class_descendant_count = class_descendant_count
  @extra_tests_executions_count = extra_tests_executions_count
  @subclasses = subclasses
end

Instance Attribute Details

#class_descendant_countObject

Returns the value of attribute class_descendant_count.



17
18
19
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 17

def class_descendant_count
  @class_descendant_count
end

#extra_tests_executions_countObject

Returns the value of attribute extra_tests_executions_count.



17
18
19
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 17

def extra_tests_executions_count
  @extra_tests_executions_count
end

#klassObject

Returns the value of attribute klass.



17
18
19
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 17

def klass
  @klass
end

#runnable_tests_countObject

Returns the value of attribute runnable_tests_count.



17
18
19
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 17

def runnable_tests_count
  @runnable_tests_count
end

#subclassesObject (readonly)

Returns the value of attribute subclasses.



18
19
20
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 18

def subclasses
  @subclasses
end

Instance Method Details

#add_subclass(subc) ⇒ Object



20
21
22
# File 'lib/ruby_minitest_analyzer/single_test_class_summary.rb', line 20

def add_subclass(subc)
  @subclasses << subc
end