Sha256: 204dcd5d0a53cd3337d3c954da1b93f5a9699801167c8bbeb2473c57049e2c0c

Contents?: true

Size: 533 Bytes

Versions: 8

Compression:

Stored size: 533 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper.rb'

describe Spec::Runner::Formatter::SnippetExtractor do
  it "should fall back on a default message when it doesn't understand a line" do
    Spec::Runner::Formatter::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
    Spec::Runner::Formatter::SnippetExtractor.new.lines_around("blech", 8).should == "# Couldn't get snippet for blech"
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
deckshuffler-0.0.2 vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/snippet_extractor_spec.rb
rspec-1.0.5 spec/spec/runner/formatter/snippet_extractor_spec.rb
rspec-1.0.6 spec/spec/runner/formatter/snippet_extractor_spec.rb
rspec-1.0.7 spec/spec/runner/formatter/snippet_extractor_spec.rb
rspec-1.0.8 spec/spec/runner/formatter/snippet_extractor_spec.rb