File: spec_helper_acceptance_local.rb

package info (click to toggle)
puppet-strings 4.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,412 kB
  • sloc: ruby: 7,324; makefile: 12
file content (12 lines) | stat: -rw-r--r-- 400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

def sut_module_path(module_regex)
  modules = JSON.parse(run_shell('bundle exec puppet module list --modulepath spec/fixtures/modules --render-as json').stdout)
  test_module_info = modules['modules_by_path'].values.flatten.find { |mod_info| mod_info =~ module_regex }
  test_module_info.match(/\(([^)]*)\)/)[1]
end

def sut_tmp_path
  # TODO: Linux only
  '/tmp/'
end