test/unit/bio/db/embl/test_sptr.rb in bio-1.3.1 vs test/unit/bio/db/embl/test_sptr.rb in bio-1.4.0
- old
+ new
@@ -5,26 +5,24 @@
# License:: The Ruby License
#
# $Id:$
#
+# loading helper routine for testing bioruby
require 'pathname'
-libpath = Pathname.new(File.join(File.dirname(__FILE__),
- ['..'] * 5, 'lib')).cleanpath.to_s
-$:.unshift(libpath) unless $:.include?(libpath)
+load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4,
+ 'bioruby_test_helper.rb')).cleanpath.to_s
+# libraries needed for the tests
require 'test/unit'
require 'bio/db/embl/sptr'
module Bio
class TestSPTR < Test::Unit::TestCase
def setup
- bioruby_root = Pathname.new(File.join(File.dirname(__FILE__),
- ['..'] * 5)).cleanpath.to_s
- data = File.open(File.join(bioruby_root,
- 'test', 'data', 'uniprot',
- 'p53_human.uniprot')).read
+ data = File.read(File.join(BioRubyTestDataPath,
+ 'uniprot', 'p53_human.uniprot'))
@obj = Bio::SPTR.new(data)
end
def test_id_line
assert(@obj.id_line)