method
snippet
1.1.12 -
Show latest stable
- Class:
Spec::Runner::Formatter::SnippetExtractor
snippet(error)public
No documentation available.
# File lib/spec/runner/formatter/snippet_extractor.rb, line 9
def snippet(error)
raw_code, line = snippet_for(error.backtrace[0])
highlighted = @@converter.convert(raw_code, false)
highlighted << "\n<span class=\"comment\"># gem install syntax to get syntax highlighting</span>" if @@converter.is_a?(NullConverter)
post_process(highlighted, line)
end