Skip to content

Commit 5fb4774

Browse files
committed
Test solutions bindings.
1 parent 18c1c86 commit 5fb4774

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

spec/query_solutions_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,26 @@
259259
expect {|b| solutions.each(&b)}.to yield_successive_args(uri, lit)
260260
end
261261
end
262+
263+
describe "#bindings" do
264+
subject {
265+
RDF::Query::Solutions(
266+
RDF::Query::Solution.new(
267+
author: RDF::URI("http://ar.to/#self"),
268+
age: RDF::Literal(0)
269+
),
270+
RDF::Query::Solution.new(
271+
author: RDF::Literal("Gregg Kellogg"),
272+
age: RDF::Literal(0)
273+
)
274+
)
275+
}
276+
it "binds author twice" do
277+
expect(subject.bindings).to include(author: [RDF::URI("http://ar.to/#self"), RDF::Literal("Gregg Kellogg")])
278+
end
279+
280+
it "binds age twice" do
281+
expect(subject.bindings).to include(age: [RDF::Literal(0), RDF::Literal(0)])
282+
end
283+
end
262284
end

0 commit comments

Comments
 (0)