Sha256: 0323c7d484aa0568bc44a373225d6c66352278c5b1989661ca6b56469349e446

Contents?: true

Size: 917 Bytes

Versions: 2

Compression:

Stored size: 917 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
  }

  #Dir["examples/CQL/Bl*.cql"].each do |cql_file|
  #Dir["examples/CQL/Meta*.cql"].each do |cql_file|
  #Dir["examples/CQL/[ACG]*.cql"].each do |cql_file|
  Dir["examples/CQL/*.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

2 entries across 2 versions & 1 rubygems

Version Path
activefacts-0.7.1 spec/cql_parse_spec.rb
activefacts-0.7.2 spec/cql_parse_spec.rb