method
snippet_for
snippet_for(error_line)
public
Hide source
# File lib/spec/runner/formatter/snippet_extractor.rb, line 16 def snippet_for(error_line) if error_line =~ /(.*):(\d+)/ file = $1 line = $2.to_i [lines_around(file, line), line] else ["# Couldn't get snippet for #{error_line}", 1] end end