Class: MinitestAnalyzerConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(required_classes_paths: [], test_files_locations_paths: [], exempted_test_file_locations_paths: []) ⇒ MinitestAnalyzerConfig

Returns a new instance of MinitestAnalyzerConfig.



4
5
6
7
8
# File 'lib/ruby_minitest_analyzer/minitest_analyzer_config.rb', line 4

def initialize(required_classes_paths: [], test_files_locations_paths: [], exempted_test_file_locations_paths: [])
  @required_classes_paths = required_classes_paths
  @test_files_locations_paths = test_files_locations_paths
  @exempted_test_file_locations_paths = exempted_test_file_locations_paths
end

Instance Attribute Details

#exempted_test_file_locations_pathsObject (readonly)

An array of String containing the paths for all the files within test_file_locations that are exempted from being required.



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

def exempted_test_file_locations_paths
  @exempted_test_file_locations_paths
end

#required_classes_pathsObject (readonly)

An array of String containing the paths of all the required classes to run the tests. E.g. [“../../../test/test_helper”]



12
13
14
# File 'lib/ruby_minitest_analyzer/minitest_analyzer_config.rb', line 12

def required_classes_paths
  @required_classes_paths
end

#test_files_locations_pathsObject (readonly)

An array of String containing the paths of all the tests classes. E.g: Dir[“test/*/.rb”]



16
17
18
# File 'lib/ruby_minitest_analyzer/minitest_analyzer_config.rb', line 16

def test_files_locations_paths
  @test_files_locations_paths
end

Instance Method Details

#setupObject



22
23
24
25
26
# File 'lib/ruby_minitest_analyzer/minitest_analyzer_config.rb', line 22

def setup
  print_tests_stats do
    require_all_test_files
  end
end