File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88shared_examples 'RDF::Literal' do |value , datatype_uri |
99 include_examples 'RDF::Literal with datatype and grammar' , value , datatype_uri
10- include_examples 'RDF::Literal equality' , value
10+ include_examples 'RDF::Literal equality' , value , value
1111 include_examples 'RDF::Literal lexical values' , value
1212end
1313
7575end
7676
7777shared_examples 'RDF::Literal canonicalization' do |datatype , pairs |
78- pairs . each do |value , str |
78+ pairs . each do |value , str , human = nil |
79+ human ||= value
7980 klass = RDF ::Literal . datatyped_class ( datatype . to_s )
8081
8182 it "does not normalize '#{ value } ' by default" do
8586 . to eq value
8687 end
8788
88- it "normalizes double '#{ value } ' to '#{ str } '" do
89+ it "normalizes '#{ value } ' to '#{ str } '" do
8990 expect ( RDF ::Literal . new ( value ,
9091 datatype : datatype ,
9192 canonicalize : true ) . to_s )
9293 . to eq str
9394 end
9495
95- it "humanizes double '#{ value } ' to '#{ str } '" do
96+ it "humanizes '#{ value } ' to '#{ str } '" do
9697 expect ( RDF ::Literal . new ( value ,
9798 datatype : datatype ,
9899 canonicalize : false ) . humanize )
99- . to eq value
100+ . to eq human
100101 end
101102
102103 it "instantiates '#{ value } ' as #{ klass } " do
You can’t perform that action at this time.
0 commit comments