Class: TestLauncher::Queries::PathQuery
Instance Attribute Summary
Attributes inherited from BaseQuery
#request
Instance Method Summary
collapse
Methods inherited from BaseQuery
#initialize
Instance Method Details
#command ⇒ Object
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
# File 'lib/test_launcher/queries.rb', line 184
def command
return if test_cases.empty?
if one_file?
shell.notify "Found #{pluralize(file_count, "file")}."
runner.single_file(test_cases.first)
elsif request.run_all?
shell.notify "Found #{pluralize(file_count, "file")}."
runner.multiple_files(test_cases)
else
shell.notify "Found #{pluralize(file_count, "file")}."
shell.notify "Running most recently edited. Run with '--all' to run all the tests."
runner.single_file(most_recently_edited_test_case)
end
end
|
#files_found_by_path ⇒ Object
206
207
208
|
# File 'lib/test_launcher/queries.rb', line 206
def files_found_by_path
@files_found_by_path ||= searcher.test_files(request.search_string)
end
|
#test_cases ⇒ Object
200
201
202
203
204
|
# File 'lib/test_launcher/queries.rb', line 200
def test_cases
@test_cases ||= files_found_by_path.map { |file_path|
request.test_case(file: file_path, request: request)
}
end
|