X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=code_ruby%2Ftest%2Fmaasha%2Ftest_locator.rb;h=052f779de88ed00582e71317199683bb40e9033b;hb=4c74f0aa5b9a572a2552767d4c4c0c15166e092a;hp=45047f2770d17a3d2ed10a19833d1a6b4838b800;hpb=8bf958c931357441fca189e45986285e2d1f2476;p=biopieces.git diff --git a/code_ruby/test/maasha/test_locator.rb b/code_ruby/test/maasha/test_locator.rb index 45047f2..052f779 100755 --- a/code_ruby/test/maasha/test_locator.rb +++ b/code_ruby/test/maasha/test_locator.rb @@ -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__