File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,14 +29,24 @@ module RDF_Enumerable
2929 it { should respond_to ( :supports? ) }
3030
3131 describe "valid?" do
32- it { should be_valid }
32+ it "reports validity" do
33+ if subject . supports? ( :validity )
34+ should be_valid
35+ else
36+ expect { subject . valid? } . to raise_error ( NotImplementedError )
37+ end
38+ end
3339
3440 it "returns false if any statement is invalid" do
3541 if subject . respond_to? ( :<< ) && ( subject . writable? rescue true )
3642 s = RDF ::Statement . from ( [ nil , nil , nil ] )
37- expect ( s ) . not_to be_valid
38- subject << s
39- expect ( subject ) . not_to be_valid
43+ if subject . supports? ( :validity )
44+ expect ( s ) . not_to be_valid
45+ subject << s
46+ expect ( subject ) . not_to be_valid
47+ else
48+ expect { subject . valid? } . to raise_error ( NotImplementedError )
49+ end
4050 else
4151 pending ( "can't add statement to immutable enumerable" )
4252 end
You can’t perform that action at this time.
0 commit comments