Class: TestRun::Tests::Minitest::Finder
- Inherits:
-
Struct
- Object
- Struct
- TestRun::Tests::Minitest::Finder
- Defined in:
- lib/test_run/tests/minitest/finder.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
-
#searcher ⇒ Object
Returns the value of attribute searcher.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query
6 7 8 |
# File 'lib/test_run/tests/minitest/finder.rb', line 6 def query @query end |
#searcher ⇒ Object
Returns the value of attribute searcher
6 7 8 |
# File 'lib/test_run/tests/minitest/finder.rb', line 6 def searcher @searcher end |
Class Method Details
.find(query, searcher) ⇒ Object
8 9 10 |
# File 'lib/test_run/tests/minitest/finder.rb', line 8 def self.find(query, searcher) new(query, searcher).find end |
Instance Method Details
#find ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/test_run/tests/minitest/finder.rb', line 12 def find return tests_found_by_absolute_path if query.match(/^\//) return tests_found_by_name unless tests_found_by_name.empty? return tests_found_by_file_name unless tests_found_by_file_name.empty? return tests_found_by_full_regex unless tests_found_by_full_regex.empty? [] end |