Sha256: 93f68716fd6430e69d3c380f00b299fcf7b6e22e49d124874d9cc1c340e8faac

Contents?: true

Size: 823 Bytes

Versions: 2

Compression:

Stored size: 823 Bytes

Contents

current = File.dirname(__FILE__)
$LOAD_PATH.unshift(File.join(current, '..', 'lib'), current)

require 'rspec'
require 'scaffolder/test/helpers'
require 'heredoc_unindent'
require 'genomer-plugin-validate'
require 'validator_run_matcher'

RSpec.configure do |config|
  config.mock_with :rr

  include Scaffolder::Test

  def annotation(options = {})
    attrs = options[:attributes] || {}
    attrs[:ID].to_s ||= '1'

    opts = {:start      => options[:start] || 1,
            :end        => options[:end]   || 3,
            :attributes => Hash[attrs.map{|(k,v)| [k.to_s,v]}]}

    Annotation.new(opts).to_gff3_record
  end

  def annotation_with_id(id)
    annotation(:attributes => {:ID => id})
  end

  def annotation_with_product(product)
    annotation(:attributes => {'product' => product, 'ID' => 1})
  end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genomer-plugin-validate-0.0.2 spec/spec_helper.rb
genomer-plugin-validate-0.0.1 spec/spec_helper.rb