Skip to content

Commit

Permalink
final cleanup for upgrade to 0.8
Browse files Browse the repository at this point in the history
* clean up RDFSource.type_registry to remove DummyAggregation
* allow Aggregation type statement to remain in repo

This reverts commit c34dfc0.
  • Loading branch information
elrayle committed Apr 14, 2016
1 parent f675efd commit 282d575
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions spec/ld4l/ore_rdf/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
describe 'LD4L::OreRDF' do

describe '#configuration' do
after(:all) do
ActiveTriples::RDFSource.type_registry.keys.each { |k| ActiveTriples::RDFSource.type_registry.delete(k) } if Object.const_defined?("ActiveTriples::RDFSource")
end

describe "base_uri" do
context "when base_uri is not configured" do
before do
Expand Down
6 changes: 5 additions & 1 deletion spec/ld4l/ore_rdf/models/proxy_resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,11 @@
subject.persist!
subject.reload
expect(subject.contributor).to eq []
expect(@repo.statements.to_a.length).to eq 1 # Only the type statements for proxy
if subject.respond_to? 'persistence_strategy' # >= ActiveTriples 0.8
expect(@repo.statements.to_a.length).to eq 2 # Only the type statements for aggregation and proxy
else # < ActiveTriples 0.8
expect(@repo.statements.to_a.length).to eq 1 # Only the type statements for proxy
end
end
end

Expand Down
4 changes: 4 additions & 0 deletions spec/ld4l/ore_rdf_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require "spec_helper"

describe "LD4L::OreRDF" do
after(:all) do
ActiveTriples::RDFSource.type_registry.keys.each { |k| ActiveTriples::RDFSource.type_registry.delete(k) } if Object.const_defined?("ActiveTriples::RDFSource")
end

describe "#configure" do

before do
Expand Down

0 comments on commit 282d575

Please sign in to comment.