Sha256: b9c922451047d3a0018f5146c57cb2e229c96963e11b2fae5b8b0e4b2cea3b34

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'heredoc_unindent'
require 'scaffolder/test/helpers'
require 'genomer-plugin-view'
require 'genomer-plugin-view/gff_record_helper'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

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

  include Scaffolder::Test
  Scaffolder::Test::Annotation.send(:include, GenomerPluginView::GffRecordHelper)

  def gene(opts = Hash.new)
    default = {
      :seqname    => 'seq1',
      :start      => 1,
      :end        => 3,
      :feature    => 'gene',
      :attributes => Hash.new}
    Annotation.new(default.merge(opts)).to_gff3_record
  end

  def cds(opts = Hash.new)
    gene({:feature => 'CDS'}.merge(opts))
  end

  class Bio::GFF::GFF3::Record
    def has_identical_attributes?(other)
      self.attributes.sort == other.attributes.sort
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genomer-plugin-view-0.0.5 spec/spec_helper.rb
genomer-plugin-view-0.0.4 spec/spec_helper.rb