|
85 | 85 | expect(solutions.size).to eq @statements.size |
86 | 86 | end |
87 | 87 |
|
88 | | - it "returns statements from unnamed graphs with false graph_name" do |
89 | | - pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: false) |
90 | | - solutions = [] |
91 | | - subject.send(method, pattern) {|s| solutions << s} |
92 | | - |
93 | | - named_statements = subject.statements |
94 | | - named_statements.reject! {|st| st.has_name?} unless |
95 | | - subject.respond_to?(:graph_name) && !subject.graph_name.nil? |
96 | | - |
97 | | - expect(solutions.size).to eq named_statements.size |
98 | | - end |
99 | | - |
100 | 88 | it "returns statements from named graphs with variable graph_name" do |
101 | 89 | unless subject.graph_names.to_a.empty? |
102 | 90 | pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: :c) |
|
314 | 302 | before { skip unless subject.respond_to?(:query_execute, true ) } |
315 | 303 |
|
316 | 304 | it "defines a protected #query_execute method" do |
317 | | - expect(subject.class.protected_method_defined?(:query_execute)) |
318 | | - .to be_truthy |
| 305 | + expect(subject.protected_methods).to include :query_execute |
319 | 306 | end |
320 | 307 |
|
321 | 308 | include_examples 'query execution', :query_execute |
|
327 | 314 | before { skip unless subject.respond_to?(:query_pattern, true ) } |
328 | 315 |
|
329 | 316 | it "defines a protected #query_pattern method" do |
330 | | - expect(subject.class.protected_method_defined?(:query_pattern)).to be_truthy |
| 317 | + expect(subject.protected_methods).to include :query_pattern |
331 | 318 | end |
332 | 319 |
|
333 | 320 | include_examples 'query pattern', :query_pattern |
|
0 commit comments