Sha256: 4ce7321c410be256147936bca6ca18d9e081eef051944f6e5b8a3ea65fe04823

Contents?: true

Size: 381 Bytes

Versions: 7

Compression:

Stored size: 381 Bytes

Contents

require 'spec_helper'
module Sexpr
  describe Parser, "factor" do

    it 'silently returns when given a Parser' do
      p = Object.new.extend(Parser)
      Parser.factor(p).should eq(p)
    end

    it 'raises a UnrecognizedParserError when no class can be found' do
      lambda{
        Parser.factor(self)
      }.should raise_error(UnrecognizedParserError)
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sexpr-1.1.0 spec/unit/parser/test_factor.rb
sexpr-1.0.0 spec/unit/parser/test_factor.rb
sexpr-0.6.0 spec/unit/parser/test_factor.rb
sexpr-0.5.1 spec/parser/test_factor.rb
sexpr-0.5.0 spec/parser/test_factor.rb
sexpr-0.4.0 spec/parser/test_factor.rb
sexpr-0.3.0 spec/parser/test_factor.rb