File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 2.0 .0
1+ 2.1 .0
Original file line number Diff line number Diff line change 1+ platform :
2+ Rubygems :
3+ rdf-isomorphic :
4+ tests :
5+ unmaintained : skip
Original file line number Diff line number Diff line change 512512
513513
514514 context "when converting" do
515- it { is_expected . to respond_to ( :to_hash ) }
516- its ( :to_hash ) { is_expected . to be_instance_of ( Hash ) }
517- context "#to_hash" do
515+ it { is_expected . to respond_to ( :to_h ) }
516+ it { is_expected . not_to respond_to ( :to_hash ) }
517+ its ( :to_hash ) {
518+ expect {
519+ is_expected . to be_instance_of ( Hash )
520+ } . to write ( "DEPRECATION" ) . to ( :error )
521+ }
522+ describe "#to_h" do
518523 it "should have as many keys as subjects" do
519- expect ( subject . to_hash . keys . size ) . to eq enumerable . subjects . to_a . size
524+ expect ( subject . to_h . keys . size ) . to eq enumerable . subjects . to_a . size
525+ end
526+ end
527+ describe "#to_h" do
528+ it "should have as many keys as subjects (with deprecation)" do
529+ expect {
530+ expect ( subject . to_hash . keys . size ) . to eq enumerable . subjects . to_a . size
531+ } . to write ( "DEPRECATION" ) . to ( :error )
520532 end
521533 end
522534 end
Original file line number Diff line number Diff line change 262262 it 'handles Graph names' do
263263 if @supports_named_graphs
264264 dels = non_bnode_statements . take ( 10 ) . map do |st |
265- RDF ::Statement . from ( st . to_hash . merge ( graph_name : RDF ::URI ( 'http://example.com/fake' ) ) )
265+ RDF ::Statement . from ( st . to_h . merge ( graph_name : RDF ::URI ( 'http://example.com/fake' ) ) )
266266 end
267267 dels . map! { |st | st . graph_name = RDF ::URI ( 'http://example.com/fake' ) ; st }
268268 dels . extend ( RDF ::Enumerable )
Original file line number Diff line number Diff line change 126126 end
127127
128128 it "should not insert an incomplete statement" do
129- expect { subject . insert ( RDF ::Statement . from ( statement . to_hash . merge ( subject : nil ) ) ) } . to raise_error ( ArgumentError )
130- expect { subject . insert ( RDF ::Statement . from ( statement . to_hash . merge ( predicate : nil ) ) ) } . to raise_error ( ArgumentError )
131- expect { subject . insert ( RDF ::Statement . from ( statement . to_hash . merge ( object : nil ) ) ) } . to raise_error ( ArgumentError )
129+ expect { subject . insert ( RDF ::Statement . from ( statement . to_h . merge ( subject : nil ) ) ) } . to raise_error ( ArgumentError )
130+ expect { subject . insert ( RDF ::Statement . from ( statement . to_h . merge ( predicate : nil ) ) ) } . to raise_error ( ArgumentError )
131+ expect { subject . insert ( RDF ::Statement . from ( statement . to_h . merge ( object : nil ) ) ) } . to raise_error ( ArgumentError )
132132 expect ( subject . count ) . to eql 0
133133 end
134134
You can’t perform that action at this time.
0 commit comments