Class: Torkify::Log::LineMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/torkify/log/line_matcher.rb

Constant Summary collapse

PATTERNS =
{
  'tork_load_line'        => /^Loaded suite tork[^\s]+\s(.+)/,
  'error_description'     => /^[\s#]*([^:]+):([0-9]+):in/,
  'file_extraction'       => /\[([^:]+):([0-9]+)\]/m,
  'tork_error_line'       => /^.+tork\/master\.rb:[0-9]+:in [^:]+:\s/,
  'test_error_or_failure' => /^(\s+[0-9]+\)|Failure(?!s)|Error)/,
  'test_summary'          => /^([0-9]+\s[a-z]+,)+/,
  'finished_line'         => /^Finished/
}

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ LineMatcher

Returns a new instance of LineMatcher.



14
15
16
# File 'lib/torkify/log/line_matcher.rb', line 14

def initialize(line)
  self.line = line
end

Instance Method Details

#end_of_errors?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/torkify/log/line_matcher.rb', line 23

def end_of_errors?
  test_summary? || finished_line?
end