Class: Nicetest::TestFinder
- Inherits:
-
Object
- Object
- Nicetest::TestFinder
- Defined in:
- lib/nicetest/test_finder.rb
Defined Under Namespace
Classes: RangeFinder
Instance Method Summary collapse
- #filter_for(target) ⇒ Object
-
#initialize ⇒ TestFinder
constructor
A new instance of TestFinder.
Constructor Details
#initialize ⇒ TestFinder
Returns a new instance of TestFinder.
8 9 10 |
# File 'lib/nicetest/test_finder.rb', line 8 def initialize @parse_cache = {} end |
Instance Method Details
#filter_for(target) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/nicetest/test_finder.rb', line 12 def filter_for(target) filename, lineno = target.split(":", 2) filepath = File.(filename) lineno = lineno&.to_i return [filepath, nil] unless lineno [filepath, find_test(filepath, lineno)] end |