Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (30 sloc) 1.135 kB
# coding: utf-8
$:.unshift "."
require 'spec_helper'
describe JSON::LD do
describe "test suite" do
require 'suite_helper'
m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}tests/expand-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 << "context: #{t.context.read}" if t.property('context')
result = JSON::LD::API.expand(t.input, 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']
Jump to Line
Something went wrong with that request. Please try again.