Class: TestLauncher::Frameworks::Minitest::Runner

Inherits:
Base::Runner
  • Object
show all
Defined in:
lib/test_launcher/frameworks/minitest.rb

Instance Method Summary collapse

Methods inherited from Base::Runner

#multiple_files, #single_file

Instance Method Details

#one_or_more_files(test_cases) ⇒ Object



24
25
26
# File 'lib/test_launcher/frameworks/minitest.rb', line 24

def one_or_more_files(test_cases)
  %{cd #{test_cases.first.app_root} && #{test_cases.first.runner} #{test_cases.map(&:relative_test_path).join(" ")}}
end

#single_example(test_case, exact_match: false) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/test_launcher/frameworks/minitest.rb', line 12

def single_example(test_case, exact_match: false)

  name =
    if exact_match
      "--name=#{test_case.example}"
    else
      "--name=/#{test_case.example}/"
    end

  %{cd #{test_case.app_root} && #{test_case.runner} #{test_case.relative_test_path} #{name}}
end