Sha256: 3e6c5d41d8d0950a23bf7b6d62cf4b6fafd4f367601b4473caea0f3440a0099f

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

require 'spec_helper'
module Gisele::Language::Syntax
  describe EventSet, "to_ast" do

    it 'converts empty lists as expected' do
      expr     = '{ }'
      expected = [:event_set]
      ast(expr, :event_set).should eq(expected)
    end

    it 'converts singleton lists as expected' do
      expr     = '{Diagnosis:start}'
      expected = [:event_set, "Diagnosis:start"]
      ast(expr, :event_set).should eq(expected)
    end

    it 'converts non empty lists as expected' do
      expr     = '{Diagnosis:start, an_event, another_one}'
      expected = [:event_set, "Diagnosis:start", "an_event", "another_one"]
      ast(expr, :event_set).should eq(expected)
    end

  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gisele-language-0.6.0 spec/language/syntax/to_ast/test_event_set.rb
gisele-language-0.5.1 spec/language/syntax/to_ast/test_event_set.rb
gisele-language-0.5.0 spec/language/syntax/to_ast/test_event_set.rb
gisele-0.5.0 spec/unit/language/syntax/to_ast/test_event_set.rb