Sha256: 4849c5cdb63db7bae6e6f3b7c772364f2c8b7e87bfd89740b94d148b1854aabc
Contents?: true
Size: 1.23 KB
Versions: 1
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/expand-manifest.jsonld') describe m.name do m.entries.each do |t| specify "#{t.property('input')}: #{t.name}" do begin case t.property('input') when /expand-(0039)/ pending("As if!") end t.debug = ["test: #{t.inspect}", "source: #{t.input.read}"] t.debug << "context: #{t.context.read}" if t.property('context') result = JSON::LD::API.expand(t.input, nil, 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json-ld-0.9.0 | spec/suite_expand_spec.rb |