1
require File.dirname(__FILE__) + '/../../../spec_helper.rb'
2
require 'spec/runner/formatter/snippet_extractor'
7
describe SnippetExtractor do
8
it "should fall back on a default message when it doesn't understand a line" do
9
SnippetExtractor.new.snippet_for("blech").should == ["# Couldn't get snippet for blech", 1]
12
it "should fall back on a default message when it doesn't find the file" do
13
SnippetExtractor.new.lines_around("blech", 8).should == "# Couldn't get snippet for blech"
b'\\ No newline at end of file'