Class: AppMap::Service::IntegrationTestPathFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/appmap/service/integration_test_path_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_path = '') ⇒ IntegrationTestPathFinder

Returns a new instance of IntegrationTestPathFinder.



8
9
10
# File 'lib/appmap/service/integration_test_path_finder.rb', line 8

def initialize(base_path = '')
  @base_path = base_path
end

Instance Method Details

#count_pathsObject



22
23
24
# File 'lib/appmap/service/integration_test_path_finder.rb', line 22

def count_paths
  find.flatten(2).length - 3
end

#findObject



12
13
14
15
16
17
18
19
20
# File 'lib/appmap/service/integration_test_path_finder.rb', line 12

def find
  @paths ||= begin
    paths = { rspec: [], minitest: [], cucumber: [] }
    paths[:rspec] = find_rspec_paths if TestFrameworkDetector.rspec_present?
    paths[:minitest] = find_minitest_paths if TestFrameworkDetector.minitest_present?
    paths[:cucumber] = find_cucumber_paths if TestFrameworkDetector.cucumber_present?
    paths
  end
end