|
75 | 75 | it {is_expected.not_to be_quoted} |
76 | 76 | it {is_expected.to be_statement} |
77 | 77 | it {is_expected.not_to be_inferred} |
| 78 | + its(:terms) {is_expected.to include(s, p, o)} |
78 | 79 | end |
79 | 80 |
|
80 | 81 | context "when created with a blank node subject" do |
|
116 | 117 | specify {expect(RDF::Statement(:s, p, o)).to eql (RDF::Statement(:s, p, o))} |
117 | 118 | specify {expect(RDF::Statement(s, p, :o)).to eq (RDF::Statement(s, p, :o))} |
118 | 119 | specify {expect(RDF::Statement(s, p, :o)).to eql (RDF::Statement(s, p, :o))} |
| 120 | + |
| 121 | + describe "#terms" do |
| 122 | + subject {RDF::Statement(:s, p, o)} |
| 123 | + specify {expect(subject.terms).not_to include(:s)} |
| 124 | + specify {expect(subject.terms).to include(p, o)} |
| 125 | + end |
119 | 126 | end |
120 | 127 |
|
121 | 128 | context "when used with strings" do |
|
293 | 300 | it "is embedded for statements having a statement object" do |
294 | 301 | expect(RDF::Statement(:s, :p, RDF::Statement(:s1, :p1, :o1))).to be_embedded |
295 | 302 | end |
| 303 | + |
| 304 | + context "#terms" do |
| 305 | + let(:s1) {RDF::URI.new("http://example.org/s1")} |
| 306 | + let(:p1) {RDF::URI("http://example.org/p1")} |
| 307 | + let(:o1) {RDF::URI.new("http://example.org/o1")} |
| 308 | + subject {RDF::Statement(s, p, RDF::Statement(s1, p1, o1))} |
| 309 | + specify {expect(subject.terms).to include(s, p, s1, p1, o1)} |
| 310 | + end |
296 | 311 | end |
297 | 312 |
|
298 | 313 | context "c14n" do |
|
0 commit comments