Sha256: 45689609d2f2f09ca95a912bc610c67a2570a301e8559418dbb0ac197f22168f
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# # ActiveFacts tests: Parse all NORMA files and check the generated CQL. # Copyright (c) 2008 Clifford Heath. Read the LICENSE file. # require 'stringio' require 'activefacts/vocabulary' require 'activefacts/support' require 'activefacts/input/cql' require 'activefacts/generate/cql' include ActiveFacts describe "CQL Parser" do cql_failures = { "Airline" => "Contains queries, unsupported", "CompanyQuery" => "Contains queries, unsupported", "OrienteeringER" => "Contains a long fact type that can't be matched properly", "ServiceDirector" => "Contains constraints with mismatched adjectives", } pattern = ENV["AFTESTS"] || "*" Dir["examples/CQL/#{pattern}.cql"].each do |cql_file| it "should load CQL #{cql_file} without parse errors" do broken = cql_failures[File.basename(cql_file, ".cql")] if broken pending(broken) { lambda { vocabulary = ActiveFacts::Input::CQL.readfile(cql_file) }.should_not raise_error } else lambda { vocabulary = ActiveFacts::Input::CQL.readfile(cql_file) }.should_not raise_error end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activefacts-0.8.6 | spec/cql_parse_spec.rb |
activefacts-0.8.5 | spec/cql_parse_spec.rb |