changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1require File.dirname(__FILE__) + '/../../../spec_helper.rb'
2require 'spec/runner/formatter/snippet_extractor'
3
4module Spec
5 module Runner
6 module Formatter
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]
10 end
11
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"
14 end
15 end
16 end
17 end
18end