Sha256: 7d8ad50123e5b32e91baa8beb4bd42c3cda53109ad7b0db98affece5f1c30f89

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

require 'spec_helper'
module Sexpr::Parser
  describe Citrus do

    it 'should be registered' do
      Sexpr::Parser.find_parser_class(bool_expr_parser).should eq(Citrus)
    end

    it 'should be served for a Citrus grammar' do
      Sexpr::Parser.factor(bool_expr_parser).should be_a(Citrus)
    end

    it 'should accept factor options, defaulting to defaults' do
      cit = Sexpr::Parser.factor(bool_expr_parser, {:hello => "World"})
      cit.options[:hello].should eq("World")
      cit.options.should have_key(:from_match_to_sexpr)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sexpr-0.3.0 spec/parser/citrus/test_registration.rb