Sha256: f8be8ab09f3f1284a6ee137edeffb6f4245057ffaffb7452ac05d375d0ff3946
Contents?: true
Size: 972 Bytes
Versions: 1
Compression:
Stored size: 972 Bytes
Contents
require 'spec_helper' require 'rdf/turtle' describe RDF::LDP do let(:anno_ttl) { File.read(fixture_path + '/open_anno_ldp_container.ttl') } describe '#remove_ldp_triples' do it 'graph returned has no ldp triples' do graph = RDF::Graph.new graph.from_ttl anno_ttl expect(graph.count).to eql 39 result = graph.query [nil, RDF.type, RDF::URI.new("http://www.w3.org/ns/ldp#Container")] expect(result.size).to eql 1 result = graph.query [nil, RDF::URI.new("http://www.w3.org/ns/ldp#contains"), nil] expect(result.size).to eql 2 stripped_graph = RDF::LDP.remove_ldp_triples graph expect(graph.count).to eql 39 result = stripped_graph.query [nil, RDF.type, RDF::URI.new("http://www.w3.org/ns/ldp#Container")] expect(result.size).to eql 0 result = stripped_graph.query [nil, RDF::URI.new("http://www.w3.org/ns/ldp#contains"), nil] expect(result.size).to eql 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rdf-ldp-0.0.3 | spec/helper_spec.rb |