Sha256: da6eda5719b44aa87a69439d6cc16449138669f65f77fbea2c2fcb97abffb283

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

require 'spec_helper'
module Gisele::Language::Syntax
  describe Grammar, 'spaces' do

    it 'parses all kind of spaces' do
      parse(' ', :spaces).should eq(' ')
      parse("\t", :spaces).should eq("\t")
      parse("\n", :spaces).should eq("\n")
      parse(" \t\n", :spaces).should eq(" \t\n")
    end

    it 'enforces mandatory spacing' do
      lambda{
        parse('', :spaces)
      }.should raise_error(Citrus::ParseError)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gisele-0.4.0 spec/unit/language/syntax/grammar/test_spaces.rb
gisele-0.3.0 spec/unit/language/syntax/grammar/test_spaces.rb