Class: TestLauncher::Frameworks::Minitest::Runner
Instance Method Summary
collapse
#multiple_examples, #multiple_files, #single_file
Instance Method Details
#by_line_number(test_case) ⇒ Object
88
89
90
91
92
93
94
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 88
def by_line_number(test_case)
if test_case.example
single_example(test_case)
else
single_file(test_case)
end
end
|
#multiple_examples_same_file(test_cases) ⇒ Object
107
108
109
110
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 107
def multiple_examples_same_file(test_cases)
test_case = test_cases.first
single_example(test_cases.first)
end
|
#multiple_examples_same_root(test_cases) ⇒ Object
112
113
114
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 112
def multiple_examples_same_root(test_cases)
%{cd #{test_cases.first.app_root} && bundle exec ruby -I test -r bundler/setup -e "ARGV.push('--name=/#{test_cases.first.example}/')" #{test_cases.map {|tc| "-r #{tc.file}"}.uniq.join(" ")}}
end
|
#one_or_more_files(test_cases) ⇒ Object
116
117
118
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 116
def one_or_more_files(test_cases)
%{cd #{test_cases.first.app_root} && #{test_cases.first.file_runner} #{test_cases.map(&:file).uniq.join(" ")}}
end
|
#single_example(test_case, name: test_case.example, exact_match: false) ⇒ Object
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/test_launcher/frameworks/minitest.rb', line 96
def single_example(test_case, name: test_case.example, exact_match: false)
name_arg =
if exact_match
name
else
"/#{name}/"
end
%{cd #{test_case.app_root} && #{test_case.example_runner} #{test_case.file} --name='#{name_arg}'}
end
|