Sha256: eb5e66450c053a9000f09ecf351dd3b99662cef76491929c21abab36d6d93472

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

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

    it 'parses empty sets' do
      parse('{}', :event_set).should eq('{}')
      parse('{   }', :event_set).should eq('{   }')
    end

    it 'parses event singletons' do
      parse('{Task:start}', :event_set).should eq('{Task:start}')
      parse('{  Task:start  }', :event_set).should eq('{  Task:start  }')
    end

    it 'parses event sets' do
      parse('{Task:start, Task:end}', :event_set).should eq('{Task:start, Task:end}')
    end

    it 'recognizes invalid events in the set' do
      lambda{
        parse('{Task:start, NotAnEvent}', :event_set)
      }.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_event_set.rb
gisele-0.3.0 spec/unit/language/syntax/grammar/test_event_set.rb