Sha256: 96cc3ba2d96e7650e9484f58ce2dc6ea6509825e89b51ac7939e7f24af67d20b
Contents?: true
Size: 1.48 KB
Versions: 6
Compression:
Stored size: 1.48 KB
Contents
require_relative '../lib/bio-publisci.rb' Given /^a (.*) generator$/ do |generator| @generator = R2RDF::Reader.const_get(generator).new end When /^I ask for its methods$/ do @methods = @generator.methods end When /^I provide an R (.*) and the label "(.*?)"$/ do |type, label| if type == "dataframe" r = Rserve::Connection.new r.eval <<-EOF library(qtl) data(listeria) mr = scanone(listeria,method="mr") EOF rexp = r.eval 'mr' @attr = rexp,label else raise "Unknown object #{type}" end end When /^I provide the.* file (.*) and the label "(.*?)"$/ do |file, label| raise "Cant find #{file}" unless File.exist? file @attr = file,label end When /^I provide the.* file (.*) and the label "(.*?)" and the options (.*)$/ do |file, label, opts| raise "Cant find #{file}" unless File.exist? file @attr = file,label,eval(opts) end When /^I provide the.* file (\S+)$/ do |file| raise "Cant find #{file}" unless File.exist? file @attr = file end When /^generate a turtle string from it$/ do @turtle_string = @generator.send :generate_n3, *@attr end Then /^I should have access to a (.*) method$/ do |method| @methods.include?(method).should == true end Then /^I should be able to call its (.*) method$/ do |method| @generator.methods.include?(:"#{method}").should == true end Then /^the result should contain a "(.*?)"$/ do |search| @turtle_string[search].should_not be nil end Then /^the result should contain some "(.*?)"s$/ do |search| @turtle_string[search].size.should > 1 end
Version data entries
6 entries across 6 versions & 1 rubygems