Sha256: adb965512e55f41ae95f31a319a45fa32e8270a522968a2c86d09b534a5e4f87

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

require File.join(File.dirname(__FILE__), %w[spec_helper])

describe TireSwing::ParseError do

  describe ".new" do
    it "takes a message and a parser instance" do
      TireSwing::ParseError.new("message", "parser").should be_an_instance_of(TireSwing::ParseError)
    end

    it "does not require a parser instance" do
      TireSwing::ParseError.new("message").message.should == "message"
    end
  end

  it "is a subclass of StandardError" do
    TireSwing::ParseError.new("message", "parser").should be_a_kind_of(StandardError)
  end

  it "has a message" do
    e = TireSwing::ParseError.new("message", "parser")
    e.message.should == "message"
  end

  it "has a parser" do
    e = TireSwing::ParseError.new("message", "parser")
    e.parser.should == "parser"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aniero-tire_swing-0.0.6 spec/error_spec.rb