|
428 | 428 | end |
429 | 429 | end |
430 | 430 |
|
431 | | - statements.each do |name, st| |
432 | | - context name do |
433 | | - let(:graph) {parse(st, rdfstar: true)} |
| 431 | + context "with rdfstar option" do |
| 432 | + statements.each do |name, st| |
| 433 | + context name do |
| 434 | + let(:graph) {parse(st, rdfstar: true)} |
| 435 | + |
| 436 | + it "creates two unquoted statements" do |
| 437 | + expect(graph.count).to eql(1) |
| 438 | + graph.statements.each do |stmt| |
| 439 | + expect(stmt).not_to be_quoted |
| 440 | + end |
| 441 | + end |
434 | 442 |
|
435 | | - it "creates two statements" do |
436 | | - expect(graph.count).to eql(1) |
437 | | - end |
| 443 | + it "has a statement whose subject or object is a statement" do |
| 444 | + referencing = graph.statements.first |
| 445 | + expect(referencing).to be_a_statement |
| 446 | + if referencing.subject.statement? |
| 447 | + expect(referencing.subject).to be_a_statement |
| 448 | + else |
| 449 | + expect(referencing.object).to be_a_statement |
| 450 | + end |
| 451 | + end |
438 | 452 |
|
439 | | - it "has a statement whose subject or object is a statement" do |
440 | | - referencing = graph.statements.first |
441 | | - expect(referencing).to be_a_statement |
442 | | - if referencing.subject.statement? |
443 | | - expect(referencing.subject).to be_a_statement |
444 | | - else |
445 | | - expect(referencing.object).to be_a_statement |
| 453 | + it "statements which are subject or object of another statement are quoted" do |
| 454 | + referencing = graph.statements.first |
| 455 | + expect(referencing).to be_a_statement |
| 456 | + if referencing.subject.statement? |
| 457 | + expect(referencing.subject).to be_a_statement |
| 458 | + expect(referencing.subject).to be_quoted |
| 459 | + else |
| 460 | + expect(referencing.object).to be_a_statement |
| 461 | + end |
446 | 462 | end |
447 | 463 | end |
448 | 464 | end |
|
0 commit comments