test/tc_gi.rb in mspire-0.1.7 vs test/tc_gi.rb in mspire-0.2.0
- old
+ new
@@ -5,16 +5,13 @@
class Gi2AnnotTest < Test::Unit::TestCase
ROOT_DIR = File.join(File.dirname(__FILE__), '..')
def test_single_query
- #begin
- annot = GI.gi2annot([16130548]).first
- #rescue
- puts "SKIPPING gi2annot test since no internet connection available:"
- puts "#{$!}"
- assert true
- #else
- assert_equal('CP4-57 prophage; RNase LS [Escherichia coli K12]'+"\n", annot)
- #end
+ annot = GI.gi2annot([16130548])
+ if annot
+ assert_equal('CP4-57 prophage; RNase LS [Escherichia coli K12]', annot.first)
+ else
+ assert_nil( puts("SKIPPING gi test (no internet connection available)") )
+ end
end
end