Sha256: b9bd10f53e448b5747565cefdabcaf20ca9692321457c357ae22ab10cf2f8483

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

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

    it 'parses a single if statement' do
      expr = 'if goodCond Task end'
      parse(expr, :if_st).should eq(expr)
    end

    it 'supports an optional else' do
      expr = 'if goodCond GoodTask else BadTask end'
      parse(expr, :if_st).should eq(expr)
    end

    it 'supports an optional elsif clauses' do
      expr = 'if goodCond GoodTask elsif otherCond OtherTask elsif yetAnother BadTask end'
      parse(expr, :if_st).should eq(expr)
    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_if_st.rb
gisele-0.3.0 spec/unit/language/syntax/grammar/test_if_st.rb