Skip to content

Commit a331b02

Browse files
committed
When Mutable#load is called with a base_uri option, it takes precedence over the resource location.
1 parent 4b499fe commit a331b02

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/rdf/spec/mutable.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
expect { subject.load(RDF::Spec::TRIPLES_FILE, **{}) }.not_to raise_error
6060
end
6161

62+
it "should prefer base_uri argument over resource location" do
63+
expect(RDF::Reader).to receive(:open)
64+
.with(RDF::Spec::TRIPLES_FILE, base_uri: "http://example.org/location")
65+
expect { subject.load(RDF::Spec::TRIPLES_FILE, base_uri: "http://example.org/location") }.not_to raise_error
66+
end
67+
6268
it "should load statements" do
6369
subject.load RDF::Spec::TRIPLES_FILE
6470
expect(subject.size).to eq File.readlines(RDF::Spec::TRIPLES_FILE).size

0 commit comments

Comments
 (0)