Class: TestLauncher::Frameworks::Base::Searcher
- Inherits:
-
Struct
- Object
- Struct
- TestLauncher::Frameworks::Base::Searcher
show all
- Defined in:
- lib/test_launcher/frameworks/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#raw_searcher ⇒ Object
Returns the value of attribute raw_searcher
6
7
8
|
# File 'lib/test_launcher/frameworks/base.rb', line 6
def raw_searcher
@raw_searcher
end
|
Instance Method Details
#by_line(file_pattern, line_number) ⇒ Object
21
22
23
|
# File 'lib/test_launcher/frameworks/base.rb', line 21
def by_line(file_pattern, line_number)
raise NotImplementedError
end
|
#examples(query) ⇒ Object
13
14
15
|
# File 'lib/test_launcher/frameworks/base.rb', line 13
def examples(query)
grep(example_name_regex(query))
end
|
#grep(regex) ⇒ Object
17
18
19
|
# File 'lib/test_launcher/frameworks/base.rb', line 17
def grep(regex)
raw_searcher.grep(regex, file_pattern: file_name_pattern)
end
|
#test_files(query) ⇒ Object
7
8
9
10
11
|
# File 'lib/test_launcher/frameworks/base.rb', line 7
def test_files(query)
raw_searcher
.find_files(query)
.select {|f| f.match(file_name_regex)}
end
|