Sha256: 128720a8de6c7f5ff366dfdcc23f8f910b621ef7ed48960153640b0da88871e0

Contents?: true

Size: 441 Bytes

Versions: 2

Compression:

Stored size: 441 Bytes

Contents

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

  it 'validates s-expressions' do
    subject.match?([:bool_lit, true]).should be_truthy
    subject.match?([:bool_lit, "x"]).should be_falsey
  end

  it 'validates s-expressions against specific rules' do
    subject[:bool_lit].match?([:bool_lit, true]).should be_truthy
    subject[:bool_and].match?([:bool_lit, true]).should be_falsey
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

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