Browse files

pull spec from rspec 1

  • Loading branch information...
1 parent 9462bef commit 1c1d570cbc56d50c05ca73ee7a4461993534f203 @dchelimsky dchelimsky committed Jul 3, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 spec/rspec/core/formatters/snippet_extractor_spec.rb
View
18 spec/rspec/core/formatters/snippet_extractor_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+require 'rspec/core/formatters/snippet_extractor'
+
+module RSpec
+ module Core
+ module Formatters
+ describe SnippetExtractor do
+ it "should fall back on a default message when it doesn't understand a line" do
+ SnippetExtractor.new.snippet_for("blech").should == ["# Couldn't get snippet for blech", 1]
+ end
+
+ it "should fall back on a default message when it doesn't find the file" do
+ SnippetExtractor.new.lines_around("blech", 8).should == "# Couldn't get snippet for blech"
+ end
+ end
+ end
+ end
+end

0 comments on commit 1c1d570

Please sign in to comment.