Skip to content

Commit

Permalink
Merge pull request #64 from ruby-rdf/feature/queryable-spec
Browse files Browse the repository at this point in the history
Feature/queryable spec
  • Loading branch information
gkellogg committed Sep 20, 2016
2 parents b38b035 + 7d67f82 commit 6a722c9
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions lib/rdf/spec/queryable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,6 @@
expect(solutions.size).to eq @statements.size
end

it "returns statements from unnamed graphs with false graph_name" do
pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: false)
solutions = []
subject.send(method, pattern) {|s| solutions << s}

named_statements = subject.statements
named_statements.reject! {|st| st.has_name?} unless
subject.respond_to?(:graph_name) && !subject.graph_name.nil?

expect(solutions.size).to eq named_statements.size
end

it "returns statements from named graphs with variable graph_name" do
unless subject.graph_names.to_a.empty?
pattern = RDF::Query::Pattern.new(nil, nil, nil, graph_name: :c)
Expand Down Expand Up @@ -314,8 +302,7 @@
before { skip unless subject.respond_to?(:query_execute, true ) }

it "defines a protected #query_execute method" do
expect(subject.class.protected_method_defined?(:query_execute))
.to be_truthy
expect(subject.protected_methods).to include :query_execute
end

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

it "defines a protected #query_pattern method" do
expect(subject.class.protected_method_defined?(:query_pattern)).to be_truthy
expect(subject.protected_methods).to include :query_pattern
end

include_examples 'query pattern', :query_pattern
Expand Down

0 comments on commit 6a722c9

Please sign in to comment.