Sha256: 85ee7040f13c29220072ed4ea1142685cd2ae90ad3cc2c7e460fe2532533bbbd

Contents?: true

Size: 1.15 KB

Versions: 12

Compression:

Stored size: 1.15 KB

Contents

#
# test/unit/bio/util/restriction_enzyme.rb - Unit test for Bio::RestrictionEnzyme
#
# Author::    Trevor Wennblom  <mailto:trevor@corevx.com>
# Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
# License::   The Ruby License
#
#  $Id:$
#

# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 3,
                            'bioruby_test_helper.rb')).cleanpath.to_s

# libraries needed for the tests
require 'test/unit'
require 'bio/util/restriction_enzyme'

module Bio; module TestRestrictionEnzyme #:nodoc:

class TestRestrictionEnzyme < Test::Unit::TestCase #:nodoc:

  def setup
    @t = Bio::RestrictionEnzyme
  end
  
  def test_rebase
    assert_equal(@t.rebase.respond_to?(:enzymes), true)
    assert_not_nil @t.rebase['AarI']
    assert_nil @t.rebase['blah']
  end
  
  def test_enzyme_name
    assert_equal(@t.enzyme_name?('AarI'), true)
    assert_equal(@t.enzyme_name?('atgc'), false)
    assert_equal(@t.enzyme_name?('aari'), true)
    assert_equal(@t.enzyme_name?('EcoRI'), true)
    assert_equal(@t.enzyme_name?('EcoooRI'), false)
  end

end

end; end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bio-2.0.5 test/unit/bio/util/test_restriction_enzyme.rb
bio-2.0.4 test/unit/bio/util/test_restriction_enzyme.rb
bio-2.0.3 test/unit/bio/util/test_restriction_enzyme.rb
bio-2.0.2 test/unit/bio/util/test_restriction_enzyme.rb
bio-2.0.1 test/unit/bio/util/test_restriction_enzyme.rb
bio-2.0.0 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.6.0.pre.20181210 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.5.2 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.5.1 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.5.0 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.4.3.0001 test/unit/bio/util/test_restriction_enzyme.rb
bio-1.4.3 test/unit/bio/util/test_restriction_enzyme.rb