Sha256: fd1dcc512aefd027fc790c4695111280def2547864abaf8b0a3fb6e5e6e1b324

Contents?: true

Size: 473 Bytes

Versions: 3

Compression:

Stored size: 473 Bytes

Contents

require 'spec_helper'
describe BoolExpr, "the parsing feature" do
  subject{ BoolExpr }

  it 'parses boolean expressions without error' do
    subject.parse("x and y").should be_a(Citrus::Match)
    subject.parse("not(y)").should be_a(Citrus::Match)
    subject.parse("not(true)").should be_a(Citrus::Match)
  end

  it 'provides a shortcut to get s-expressions directly' do
    subject.sexpr("x and y").should eq([:bool_and, [:var_ref, "x"], [:var_ref, "y"]])
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sexpr-1.1.0 spec/integration/bool_expr/test_parsing.rb
sexpr-1.0.0 spec/integration/bool_expr/test_parsing.rb
sexpr-0.6.0 spec/integration/bool_expr/test_parsing.rb