Skip to content

Commit

Permalink
More graph use cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Apr 13, 2012
1 parent bca4483 commit 6873918
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
32 changes: 31 additions & 1 deletion spec/from_rdf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
$:.unshift "."
require 'spec_helper'
require 'rdf/spec/writer'
require 'rdf/trig'

describe JSON::LD::API do
describe ".fromRDF" do
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 0 additions & 3 deletions spec/suite_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6873918

Please sign in to comment.