class Gtn::Test::IntersectionTest
Testing for the class
Testing for the class
Public Instance Methods
# File _plugins/util.rb, line 161 def test_bad_versions # toolshed.g2.bx.psu.edu/repos/wolma/mimodd_main/mimodd_info/0.1.8_1 assert_equal(fix_version("0.1.8_1"), "0.1.8galaxy1") # toolshed.g2.bx.psu.edu/repos/iuc/snap_training/snap_training/2013_11_29+galaxy1 assert_equal(fix_version("2013_11_29+galaxy1"), "2013.11.29galaxy1") # toolshed.g2.bx.psu.edu/repos/devteam/vcffilter/vcffilter2/1.0.0_rc1+galaxy3 assert_equal(fix_version("1.0.0_rc1+galaxy3"), "1.0.0rc1galaxy3") # assert_equal(fix_version("3+galaxy0"), "3.0.0galaxy0") end
# File _plugins/gtn/supported.rb, line 187 def test_exact data = { 'servers' => { 0 => 's0', 1 => 's1', 2 => 's2' }, 'tools' => { 'upload1' => { '_' => [0, 1, 2] }, 'ts/repos/hexy/lena/tool1' => { '1.0' => [0, 1], '2.0' => [0, 2] } } } # Inexact here is empty because all are exactly supporting assert_equal(Gtn::Supported.calculate(data, ['upload1']), { exact: %w[s0 s1 s2], inexact: [] }) assert_equal(Gtn::Supported.calculate(data, ['upload1', 'ts/repos/hexy/lena/tool1/1.0']), { exact: %w[s0 s1], inexact: %w[s2] }) assert_equal(Gtn::Supported.calculate(data, ['upload1', 'ts/repos/hexy/lena/tool1/2.0']), { exact: %w[s0 s2], inexact: %w[s1] }) assert_equal(Gtn::Supported.calculate(data, %w[upload1 unknown-tool]), { exact: %w[], inexact: %w[] }) end