test/unit/bio/appl/tmhmm/test_report.rb in bio-1.3.1 vs test/unit/bio/appl/tmhmm/test_report.rb in bio-1.4.0
- old
+ new
@@ -2,24 +2,25 @@
# test/unit/bio/appl/tmhmm/test_report.rb - Unit test for Bio::TMHMM::Report
#
# Copyright:: Copyright (C) 2005 Mitsuteru Nakao <n@bioruby.org>
# License:: The Ruby License
#
-# $Id: test_report.rb,v 1.4 2007/04/05 23:35:43 trevor Exp $
+# $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/appl/tmhmm/report'
module Bio
- bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5)).cleanpath.to_s
- test_data = Pathname.new(File.join(bioruby_root, 'test', 'data', 'TMHMM')).cleanpath.to_s
+ test_data = Pathname.new(File.join(BioRubyTestDataPath, 'TMHMM')).cleanpath.to_s
TMHMMReport = File.open(File.join(test_data, 'sample.report')).read
class TestTMHMMReport_reports < Test::Unit::TestCase
def test_reports