class TestLauncher::Frameworks::Base::Searcher

Public Instance Methods

by_line(file_pattern, line_number) click to toggle source
# File lib/test_launcher/frameworks/base.rb, line 21
def by_line(file_pattern, line_number)
  raise NotImplementedError
end
examples(query) click to toggle source
# File lib/test_launcher/frameworks/base.rb, line 13
def examples(query)
  grep(example_name_regex(query))
end
grep(regex) click to toggle source
# 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) click to toggle source
# 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

Private Instance Methods

example_name_regex(query) click to toggle source
# File lib/test_launcher/frameworks/base.rb, line 35
def example_name_regex(query)
  raise NotImplementedError
end
file_name_pattern() click to toggle source
# File lib/test_launcher/frameworks/base.rb, line 31
def file_name_pattern
  raise NotImplementedError
end
file_name_regex() click to toggle source
# File lib/test_launcher/frameworks/base.rb, line 27
def file_name_regex
  raise NotImplementedError
end