Sha256: f95d22c112fd7b9fdb7df7cc534050a0edae13f5acf6fe9663a62dfd6aaecafe

Contents?: true

Size: 805 Bytes

Versions: 1

Compression:

Stored size: 805 Bytes

Contents

#
# ActiveFacts tests: Parse all NORMA files and check the generated CQL.
# Copyright (c) 2008 Clifford Heath. Read the LICENSE file.
#
require 'rubygems'
require 'stringio'
require 'activefacts/vocabulary'
require 'activefacts/support'
require 'activefacts/input/cql'
require 'activefacts/generate/cql'

include ActiveFacts

describe "CQL Parser" do
  CQLPARSE_FAILURES = %w{
    Airline
    CompanyQuery
    Insurance
    OrienteeringER
    ServiceDirector
  }

  pattern = ENV["AFTESTS"] || "*"
  Dir["examples/CQL/#{pattern}.cql"].each do |cql_file|
    it "should load CQL #{cql_file} without parse errors" do
      pending if CQLPARSE_FAILURES.include? File.basename(cql_file, ".cql")
      lambda { vocabulary = ActiveFacts::Input::CQL.readfile(cql_file) }.should_not raise_error
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activefacts-0.7.3 spec/cql_parse_spec.rb