Sha256: 06f2006611577759dc3f59c469c290a30aba8bc7cda2791925763fadcb171e01

Contents?: true

Size: 673 Bytes

Versions: 6

Compression:

Stored size: 673 Bytes

Contents

require 'spec_helper'
module Sexpr::Parser
  describe Citrus, "new" do

    it 'factors a Parser instance when a Citrus::Grammar' do
      p = Citrus.new(bool_expr_parser)
      p.should be_a(Citrus)
      p.parser.should eq(bool_expr_parser)
    end

    it 'factors a Parser instance when a Path to a .citrus file' do
      p = Citrus.new(fixtures_path/"bool_expr.citrus")
      p.should be_a(Citrus)
      p.parser.should eq(bool_expr_parser)
    end

    it 'factors a Parser instance when a Path to a .citrus file' do
      p = Citrus.new (fixtures_path/"bool_expr.citrus").to_s
      p.should be_a(Citrus)
      p.parser.should eq(bool_expr_parser)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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