Sha256: 595eebe0c281c343c94da1f25bd509edeea859879438532f52f9499b3a0ae530

Contents?: true

Size: 393 Bytes

Versions: 4

Compression:

Stored size: 393 Bytes

Contents

require 'spec_helper'
module Gisele::Language
  describe Grammar, 'boolean_literal' do

    it 'parses booleans' do
      parse('true',  :boolean_literal).should eq('true')
      parse('false', :boolean_literal).should eq('false')
    end

    it 'does not parses integers' do
      lambda{
        parse('0', :boolean_literal)
      }.should raise_error(Citrus::ParseError)
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gisele-language-0.6.0 spec/language/syntax/grammar/test_boolean_literal.rb
gisele-language-0.5.1 spec/language/syntax/grammar/test_boolean_literal.rb
gisele-language-0.5.0 spec/language/syntax/grammar/test_boolean_literal.rb
gisele-0.5.0 spec/unit/language/syntax/grammar/test_boolean_literal.rb