Sha256: bb23e16b130ee8bd70d07a09303f1017450206e12f46555a2417e4b119f4b657
Contents?: true
Size: 1.14 KB
Versions: 6
Compression:
Stored size: 1.14 KB
Contents
require_relative '../lib/bio-publisci.rb' Given /a store of type (.*?)$/ do |type| @store = R2RDF::Store.new(type: :"#{type}") end When /^I call the stores add method with the turtle file (.*?) and an RDF::(.*?)$/ do |file,graph| graph = RDF.const_get(graph).new #rescue graph @graph = @store.add(file,graph) end When /^I call the stores add method with the turtle file (.*?) and the graph name "(.*?)"$/ do |file,graph| @graph = @store.add(file,graph) end When /^I call the query method using the text in file (.*)$/ do |file| query_string = IO.read(file) @query_result = @store.query(query_string) end Then /^calling the query method using the text in file (.*) should return (.*) results$/ do |file, num| query_string = IO.read(file) @store.query(query_string) #.size.should == num end Then /^I should recieve a non-empty graph$/ do @graph.is_a?(RDF::Repository).should be true @graph.size.should > 0 end Then /^I should receive an info string$/ do @graph.is_a?(String).should be true end Then /^I should receive (.*) results$/ do |num| @query_result.size.should == num.to_i end # Then /^raise the result$/ do # raise "got @graph" # end
Version data entries
6 entries across 6 versions & 1 rubygems