~ubuntu-branches/ubuntu/karmic/puppet/karmic-security

« back to all changes in this revision

Viewing changes to vendor/gems/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Pollock
  • Date: 2009-04-13 17:12:47 UTC
  • mfrom: (1.1.9 upstream) (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090413171247-qou3gsiihama09cm
Tags: 0.24.8-1
* New upstream release
* debian/control: Add Nigel Kersten and myself as uploaders
* debian/changelog: wrap long lines
* debian/watch: ignore release candidates
* debian/compat: bump to 5
* debian/control: bump Standards-Version (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
require File.dirname(__FILE__) + '/../../../spec_helper.rb'
2
 
require 'spec/runner/formatter/snippet_extractor'
3
 
 
4
 
module 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
18
 
end
 
 
b'\\ No newline at end of file'