Sha256: 054604a944fb6b55fc86dc9ab569085e216ea56931bd4c4e73667527f570e52e

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 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('http://json-ld.org/test-suite/tests/frame-manifest.jsonld')
    describe m.name, :pending => "New framing algorithm" 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, 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.9.1 spec/suite_frame_spec.rb
json-ld-0.9.0 spec/suite_frame_spec.rb