Sha256: 8887c678ae3cff705c00518931abf4a3776e774cf4a86ed5c41e5bbd6376bd78

Contents?: true

Size: 982 Bytes

Versions: 2

Compression:

Stored size: 982 Bytes

Contents

$:.unshift "."
require File.join(File.dirname(__FILE__), 'spec_helper')
include RdfContext

describe N3Parser do
  describe "w3c cwm tests" do
    require 'rdf_helper'

    def self.test_cases
      RdfHelper::TestCase.test_cases(CWM_TEST, SWAP_DIR) rescue []
    end

    # Negative parser tests should raise errors.
    test_cases.each do |t|
      #next unless t.about =~ /rdfms-rdf-names-use/
      #next unless t.name =~ /11/
      #puts t.inspect
      specify "test #{t.name}: " + (t.description || "#{t.inputDocument} against #{t.outputDocument}") do
        begin
          t.run_test do |rdf_string, parser|
            parser.parse(rdf_string, t.about, :strict => true, :debug => [])
          end
        rescue RSpec::Expectations::ExpectationNotMetError => e
          if t.status == "pending"
            pending("Formulae not supported") {  raise } 
          else
            pending("CWM tests not conformant")
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rdf_context-0.5.11 spec/cwm_spec.rb
rdf_context-0.5.10 spec/cwm_spec.rb