Skip to content

Commit 6a722c9

Browse files
authored
Merge pull request #64 from ruby-rdf/feature/queryable-spec
Feature/queryable spec
2 parents b38b035 + 7d67f82 commit 6a722c9

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

lib/rdf/spec/queryable.rb

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,6 @@
8585
expect(solutions.size).to eq @statements.size
8686
end
8787

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-
10088
it "returns statements from named graphs with variable graph_name" do
10189
unless subject.graph_names.to_a.empty?
10290
pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: :c)
@@ -314,8 +302,7 @@
314302
before { skip unless subject.respond_to?(:query_execute, true ) }
315303

316304
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
319306
end
320307

321308
include_examples 'query execution', :query_execute
@@ -327,7 +314,7 @@
327314
before { skip unless subject.respond_to?(:query_pattern, true ) }
328315

329316
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
331318
end
332319

333320
include_examples 'query pattern', :query_pattern

0 commit comments

Comments
 (0)