Class: SnapCI::ParallelTests::Test::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_ci/parallel_tests/test/runner.rb

Instance Method Summary collapse

Instance Method Details

#cli_helperObject



23
24
25
# File 'lib/snap_ci/parallel_tests/test/runner.rb', line 23

def cli_helper
  CLIHelper
end

#execute(test_files, options) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/snap_ci/parallel_tests/test/runner.rb', line 9

def execute(test_files, options)
  test_files = test_files.map { |f| Shellwords.escape(f) }

  cmd = ['ruby', '-Itest', test_files, options[:test_opts]].flatten.compact.join(' ')

  $stderr.puts(cmd)

  exec(cmd)
end

#report_test_partitioning?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/snap_ci/parallel_tests/test/runner.rb', line 19

def report_test_partitioning?
  true
end

#test_file_nameObject



31
32
33
# File 'lib/snap_ci/parallel_tests/test/runner.rb', line 31

def test_file_name
  'test'
end

#test_suffixObject



27
28
29
# File 'lib/snap_ci/parallel_tests/test/runner.rb', line 27

def test_suffix
  /_(test|spec).rb$/
end