Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed more Ruby 1.8 problems in specs.

  • Loading branch information...
commit c35866e983868247fbf4133a0a54ae041b957e9f 1 parent 534d6a3
@gkellogg gkellogg authored
Showing with 11 additions and 13 deletions.
  1. +4 −4 spec/query_spec.rb
  2. +7 −9 spec/readme_spec.rb
View
8 spec/query_spec.rb
@@ -232,10 +232,10 @@
query = RDF::Query.new do |query|
query << [:s, EX.p, :o]
end
- query.execute(@graph).bindings.should == {
- :s => [EX.x1, EX.x2, EX.x3],
- :o => [RDF::Literal.new(1), RDF::Literal.new(2), RDF::Literal.new(3) ]
- }
+ bindings = query.execute(@graph).bindings
+ bindings.keys.sort_by(&:to_s).should == [:o, :s]
+ bindings[:o].sort.should == [RDF::Literal.new(1), RDF::Literal.new(2), RDF::Literal.new(3)]
+ bindings[:s].sort.should == [EX.x1, EX.x2, EX.x3]
end
# From sp2b benchmark, query 7 bgp 2
View
16 spec/readme_spec.rb
@@ -139,16 +139,14 @@ def example4
end
context "the 'Using pre-defined RDF vocabularies' example" do
- include RDF
-
def example3
- DC.title #=> RDF::URI("http://purl.org/dc/terms/title")
- FOAF.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
- RDF.type #=> RDF::URI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
- RDFS.seeAlso #=> RDF::URI("http://www.w3.org/2000/01/rdf-schema#seeAlso")
- RSS.title #=> RDF::URI("http://purl.org/rss/1.0/title")
- OWL.sameAs #=> RDF::URI("http://www.w3.org/2002/07/owl#sameAs")
- XSD.dateTime #=> RDF::URI("http://www.w3.org/2001/XMLSchema#dateTime")
+ RDF::DC.title #=> RDF::URI("http://purl.org/dc/terms/title")
+ RDF::FOAF.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
+ RDF.type #=> RDF::URI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
+ RDF::RDFS.seeAlso #=> RDF::URI("http://www.w3.org/2000/01/rdf-schema#seeAlso")
+ RDF::RSS.title #=> RDF::URI("http://purl.org/rss/1.0/title")
+ RDF::OWL.sameAs #=> RDF::URI("http://www.w3.org/2002/07/owl#sameAs")
+ RDF::XSD.dateTime #=> RDF::URI("http://www.w3.org/2001/XMLSchema#dateTime")
end
it "should not raise errors" do
Please sign in to comment.
Something went wrong with that request. Please try again.