Sha256: f5b5ae84bce8df17ce091e4a2d878ea5ed3c084162c8463be933312ec50348a7

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'
require 'genomer-plugin-validate/validator/gff3_attributes'

describe GenomerPluginValidate::Validator::Gff3Attributes do

  subject{ described_class }

  describe "where there are no annotations" do
    it{ should return_no_errors_for [] }
  end

  describe "where there are valid GFF3 attributes" do
    attrs = %w|ID Name Alias Parent Target Gap Derives_from
               Note Dbxref Ontology_term Is_circular|
    attrs.each do |attr|
      attns = [annotation({:attributes => {attr => 'something'}})]
      it{ should return_no_errors_for attns}
    end
  end

  describe "where there are lower case attribute keys" do
    attns = [annotation({:attributes => {'unknown_term' => 'something'}})]
    it{ should return_no_errors_for attns}
  end

  describe "where there is an unknown capitalised attribute key" do
    attns =  [annotation({:attributes => {'Unknown_term' => 'something','ID' => 1}})]
    errors = ["Illegal GFF3 attribute 'Unknown_term' for '1'"]
    it{ should return_errors_for attns, errors}
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

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