]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_ruby/test/maasha/test_locator.rb
rewrite of FASTQ internals
[biopieces.git] / code_ruby / test / maasha / test_locator.rb
index 45047f2770d17a3d2ed10a19833d1a6b4838b800..052f779de88ed00582e71317199683bb40e9033b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env ruby
-$:.unshift File.join(File.dirname(__FILE__),'..','lib')
+$:.unshift File.join(File.dirname(__FILE__), '..', '..')
 
 # Copyright (C) 2007-2011 Martin A. Hansen.
 
@@ -28,38 +28,36 @@ $:.unshift File.join(File.dirname(__FILE__),'..','lib')
 require 'maasha/seq'
 require 'maasha/locator'
 require 'test/unit'
-require 'pp'
+require 'test/helper'
 
 class TestLocator < Test::Unit::TestCase 
   def setup
     @seq = Seq.new(nil, "tcatgatcaagatctaacagcagaagtacacttctattta", "dna")
   end
 
-  def test_Locator_with_single_position_returns_correctly
+  test "#new with single position returns correctly" do
     loc = Locator.new("10", @seq)
     assert_equal("a", loc.subseq.seq)
   end
 
-  def test_Locator_with_single_interval_returns_correctly
+  test "#new with single interval returns correctly" do
     loc = Locator.new("5..10", @seq)
     assert_equal("gatcaa", loc.subseq.seq)
   end
 
-  def test_Locator_with_multiple_intervals_return_correctly
+  test "#new with multiple intervals return correctly" do
     loc = Locator.new("5..10,15..20", @seq)
     assert_equal("gatcaataacag", loc.subseq.seq)
   end
 
-  def test_Locator_with_join_multiple_intervals_return_correctly
+  test "#new with join multiple intervals return correctly" do
     loc = Locator.new("join(5..10,15..20)", @seq)
     assert_equal("gatcaataacag", loc.subseq.seq)
   end
 
-  def test_Locator_with_complement_and_single_interval_return_correctly
+  test "#new with complement and single interval return correctly" do
     loc = Locator.new("complement(5..10)", @seq)
     assert_equal("ttgatc", loc.subseq.seq)
   end
 end
 
-
-__END__