]> git.donarmstrong.com Git - biopieces.git/commitdiff
polished test_cigar.rb
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 5 Sep 2011 06:30:51 +0000 (06:30 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 5 Sep 2011 06:30:51 +0000 (06:30 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1512 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/cigar.rb
code_ruby/test/maasha/test_cigar.rb

index 78e3afe1ecaf0d1a757280697cad5ff5266f51f8..800fc1414104d755c99ab1d9e206d400d40a1242 100644 (file)
@@ -133,7 +133,7 @@ class Cigar
 
   # Method to check that the CIGAR string is formatted
   # correctly, including hard clipping and soft clipping
-  # can't be located internally.
+  # that cant be located internally.
   def check_cigar
     unless  cigar =~ /^(\*|([0-9]+[MIDNSHPX=])+)$/
       raise CigarError, "Bad cigar format: #{cigar}"
index d4e014faf3ee6f85b9204b26fd3443173cb42151..78df1b7568592a32e4f3e7f08059a2cdaab18060 100755 (executable)
@@ -42,6 +42,10 @@ class CigarTest < Test::Unit::TestCase
     assert_nothing_raised { Cigar.new("1H1S1M1S1H") }
   end
 
+  def test_Cigar_to_s_returns_correctly
+    assert_equal("1M", Cigar.new("1M").to_s)
+  end
+
   def test_Cigar_each_returns_correctly
     cigar = Cigar.new("10M")