Sha256: ea7e020414cdd8114957ccef3d9fd161f0bcd900a5ea4c9fdd342a1e68a7d88d
Contents?: true
Size: 748 Bytes
Versions: 2
Compression:
Stored size: 748 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper.rb' class TestScriptFinder < Test::Unit::TestCase def test_unique_prefixes prefixes = ScriptFinder::Finder.new([]).unique_prefixes( %w{db dbconsole destroy desmond}) assert_equal prefixes.values.size, prefixes.values.uniq.size end def test_unique_prefixes_gives_shortest_prefix prefixes = ScriptFinder::Finder.new([]).unique_prefixes(%w{db dbconsole destroy desmond funball}) assert_equal 'db', prefixes['db'] assert_equal 'dbc', prefixes['dbconsole'] assert_equal 'dest', prefixes['destroy'] assert_equal 'desm', prefixes['desmond'] assert_equal 'f', prefixes['funball'] end def test_truth assert true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tobias-script_finder-0.0.2 | test/test_script_finder.rb |
tobias-script_finder-0.0.3 | test/test_script_finder.rb |