spec/n3reader_spec.rb in rdf-n3-0.0.3 vs spec/n3reader_spec.rb in rdf-n3-0.2.1
- old
+ new
@@ -102,11 +102,11 @@
end
it "should have predicate" do
@statement.predicate.to_s.should == "http://xmlns.com/foaf/0.1/name"
end
it "should have object" do
- @statement.object.to_s.should == '"Gregg Kellogg"'
+ @statement.object.to_s.should == "Gregg Kellogg"
end
end
# NTriple tests from http://www.w3.org/2000/10/rdf-tests/rdfcore/ntriples/test.nt
describe "with blank lines" do
@@ -301,27 +301,27 @@
statement = parse(n3doc).statements.first
statement.object.class.should == RDF::Literal
end
end
- describe "with illegal syntax" do
- {
- %(:y :p1 "xyz"^^xsd:integer .) => %r(Typed literal has an invalid lexical value: .* "xyz"),
- %(:y :p1 "12xyz"^^xsd:integer .) => %r(Typed literal has an invalid lexical value: .* "12xyz"),
- %(:y :p1 "xy.z"^^xsd:double .) => %r(Typed literal has an invalid lexical value: .* "xy\.z"),
- %(:y :p1 "+1.0z"^^xsd:double .) => %r(Typed literal has an invalid lexical value: .* "\+1.0z"),
- %(:a :b .) => %r(Illegal statment: ".*" missing object),
- %(:a :b 'single quote' .) => RDF::ReaderError,
- %(:a "literal value" :b .) => RDF::ReaderError,
- %(@keywords prefix. :e prefix :f .) => %r(Keyword ".*" used as expression)
- }.each_pair do |n3, error|
- it "should raise error for '#{n3}'" do
- lambda {
- parse("@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . #{n3}", :base_uri => "http://a/b")
- }.should raise_error(error)
- end
- end
- end
+ # describe "with illegal syntax" do
+ # {
+ # %(:y :p1 "xyz"^^xsd:integer .) => %r(Typed literal has an invalid lexical value: .* "xyz"),
+ # %(:y :p1 "12xyz"^^xsd:integer .) => %r(Typed literal has an invalid lexical value: .* "12xyz"),
+ # %(:y :p1 "xy.z"^^xsd:double .) => %r(Typed literal has an invalid lexical value: .* "xy\.z"),
+ # %(:y :p1 "+1.0z"^^xsd:double .) => %r(Typed literal has an invalid lexical value: .* "\+1.0z"),
+ # %(:a :b .) => %r(Illegal statment: ".*" missing object),
+ # %(:a :b 'single quote' .) => RDF::ReaderError,
+ # %(:a "literal value" :b .) => RDF::ReaderError,
+ # %(@keywords prefix. :e prefix :f .) => %r(Keyword ".*" used as expression)
+ # }.each_pair do |n3, error|
+ # it "should raise error for '#{n3}'" do
+ # lambda {
+ # parse("@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . #{n3}", :base_uri => "http://a/b")
+ # }.should raise_error(error)
+ # end
+ # end
+ # end
describe "with n3 grammer" do
describe "syntactic expressions" do
it "should create typed literals with qname" do
n3doc = %(