Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More graph use cases.

  • Loading branch information...
commit 68739181ff13c260bc743de0a11369fe78cf6173 1 parent bca4483
Gregg Kellogg authored
32 spec/from_rdf_spec.rb
View
@@ -2,7 +2,6 @@
$:.unshift "."
require 'spec_helper'
require 'rdf/spec/writer'
-require 'rdf/trig'
describe JSON::LD::API do
describe ".fromRDF" do
@@ -240,6 +239,37 @@
}
]
},
+ "Two Graphs with same subject and lists" => {
+ :input => %(
+ @prefix : <http://example.com/> .
+ :U { :a :b (:c) .}
+ :V { :a :b (:e) .}
+ ),
+ :output => [
+ {
+ "@id": "http://example.com/U",
+ "@graph": [
+ {
+ "@id": "http://example.com/a",
+ "http://example.com/b": {
+ "@list": [{"@id": "http://example.com/c"}]
+ }
+ }
+ ]
+ },
+ {
+ "@id": "http://example.com/V",
+ "@graph": [
+ {
+ "@id": "http://example.com/a",
+ "http://example.com/b": {
+ "@list": [{"@id": "http://example.com/e"}]
+ }
+ }
+ ]
+ }
+ ]
+ },
}.each_pair do |name, properties|
it name do
r = serialize(properties[:input], :reader => RDF::TriG::Reader)
1  spec/spec_helper.rb
View
@@ -8,6 +8,7 @@
require 'json/ld'
require 'rdf/nquads'
require 'rdf/turtle'
+require 'rdf/trig'
require 'rdf/spec'
require 'rdf/spec/matchers'
require 'yaml'
3  spec/suite_helper.rb
View
@@ -4,9 +4,6 @@
require 'json/ld'
require 'open-uri'
-require 'rdf/turtle'
-
-
# For now, override RDF::Utils::File.open_file to look for the file locally before attempting to retrieve it
module RDF::Util
module File
Please sign in to comment.
Something went wrong with that request. Please try again.