|
26 | 26 |
|
27 | 27 | context 'with a graph_name' do |
28 | 28 | let(:queryable) do |
29 | | - graph_name = RDF::URI('g') |
| 29 | + graph_name = RDF::URI('http://example.com/g') |
30 | 30 | graph = RDF::Graph.new(graph_name: graph_name, data: repository) |
31 | 31 | graph.insert(*RDF::Spec.quads) |
32 | 32 | klass.new(repository, graph_name: graph_name) |
|
96 | 96 | end |
97 | 97 |
|
98 | 98 | describe "#delete" do |
99 | | - let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') } |
| 99 | + let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') } |
100 | 100 |
|
101 | 101 | it 'adds to deletes' do |
102 | 102 | repository.insert(st) |
|
108 | 108 | end |
109 | 109 |
|
110 | 110 | it 'adds multiple to deletes' do |
111 | | - sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z') |
| 111 | + sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z') |
112 | 112 | repository.insert(*sts) |
113 | 113 |
|
114 | 114 | expect do |
|
118 | 118 | end |
119 | 119 |
|
120 | 120 | it 'adds enumerable to deletes' do |
121 | | - sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z') |
| 121 | + sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z') |
122 | 122 | sts.extend(RDF::Enumerable) |
123 | 123 | repository.insert(sts) |
124 | 124 |
|
|
149 | 149 | end |
150 | 150 |
|
151 | 151 | it 'overwrites existing graph names' do |
152 | | - st.graph_name = RDF::URI('g') |
| 152 | + st.graph_name = RDF::URI('http://example.com/g') |
153 | 153 | repository.insert(st) |
154 | 154 |
|
155 | 155 | expect do |
|
172 | 172 | end |
173 | 173 |
|
174 | 174 | describe "#insert" do |
175 | | - let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') } |
| 175 | + let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') } |
176 | 176 |
|
177 | 177 | it 'adds to inserts' do |
178 | 178 | expect do |
|
183 | 183 | end |
184 | 184 |
|
185 | 185 | it 'adds multiple to inserts' do |
186 | | - sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z') |
| 186 | + sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z') |
187 | 187 |
|
188 | 188 | expect do |
189 | 189 | subject.insert(*sts) |
|
193 | 193 | end |
194 | 194 |
|
195 | 195 | it 'adds enumerable to inserts' do |
196 | | - sts = [st] << RDF::Statement(:x, RDF::URI('y'), 'z') |
| 196 | + sts = [st] << RDF::Statement(:x, RDF::URI('http://example.com/y'), 'z') |
197 | 197 | sts.extend(RDF::Enumerable) |
198 | 198 |
|
199 | 199 | expect do |
|
221 | 221 | end |
222 | 222 |
|
223 | 223 | it 'overwrites existing graph names' do |
224 | | - st.graph_name = RDF::URI('g') |
| 224 | + st.graph_name = RDF::URI('http://example.com/g') |
225 | 225 | with_name = st.dup |
226 | 226 | with_name.graph_name = graph_uri |
227 | 227 |
|
|
251 | 251 | end |
252 | 252 |
|
253 | 253 | describe '#execute' do |
254 | | - let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') } |
| 254 | + let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') } |
255 | 255 |
|
256 | 256 | context 'after rollback' do |
257 | 257 | before { subject.rollback } |
|
333 | 333 |
|
334 | 334 | describe '#rollback' do |
335 | 335 | before { subject.insert(st); subject.delete(st) } |
336 | | - let(:st) { RDF::Statement(:s, RDF::URI('p'), 'o') } |
| 336 | + let(:st) { RDF::Statement(:s, RDF::URI('http://example.com/p'), 'o') } |
337 | 337 |
|
338 | 338 | it 'empties changes when available' do |
339 | 339 | expect { subject.rollback }.to change { subject.changes }.to be_empty |
|
0 commit comments