Sha256: 80d6b212adbd37ab4edd6da152a558be9fc97c0598c7768aa1ee90a95dedc846
Contents?: true
Size: 1.28 KB
Versions: 6
Compression:
Stored size: 1.28 KB
Contents
# coding: utf-8 $:.unshift "." require 'spec_helper' describe JSON::LD do describe "test suite" do require 'suite_helper' require 'suite_helper' m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}tests/frame-manifest.jsonld") describe m.name do m.entries.each do |t| specify "#{t.property('input')}: #{t.name}" do begin t.debug = ["test: #{t.inspect}", "source: #{t.input.read}"] t.debug << "frame: #{t.frame.read}" if t.property('frame') result = JSON::LD::API.frame(t.input, t.frame, :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}\n#{t.debug.join("\n")}\n#{e.backtrace.join("\n")}}") rescue JSON::LD::InvalidContext => e fail("Invalid Context: #{e.message}\n#{t.debug.join("\n")}\n#{e.backtrace.join("\n")}}") rescue JSON::LD::InvalidFrame => e fail("Invalid Frame: #{e.message}\n#{t.debug.join("\n")}\n#{e.backtrace.join("\n")}}") end end end end end end unless ENV['CI']
Version data entries
6 entries across 6 versions & 1 rubygems