Sha256: 2007360ab5a52eca24204a6589814b1503917e37578f4279c2c97b5b6d87011c
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
# coding: utf-8 $:.unshift "." require 'spec_helper' describe JSON::LD do describe "test suite" do require 'suite_helper' m = Fixtures::SuiteTest::Manifest.open('http://json-ld.org/test-suite/tests/compact-manifest.jsonld') describe m.name do m.entries.each do |t| specify "#{t.property('input')}: #{t.name}" do begin #pending("resolution of term rank in compact-0018") if t.property('input') == 'compact-0018-in.jsonld' t.debug = ["test: #{t.inspect}", "source: #{t.input.read}"] t.debug << "context: #{t.context.read}" if t.property('context') result = JSON::LD::API.compact(t.input, t.context, nil, :base => t.base, :debug => t.debug) expected = JSON.load(t.expect) result.should produce(expected, t.debug) rescue JSON::LD::ProcessingError => e fail("Processing error: #{e.message}") rescue JSON::LD::InvalidContext => e fail("Invalid Context: #{e.message}") rescue JSON::LD::InvalidFrame => e fail("Invalid Frame: #{e.message}") end end end end end end unless ENV['CI']
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
json-ld-0.3.2 | spec/suite_compact_spec.rb |
json-ld-0.3.1 | spec/suite_compact_spec.rb |