Sha256: f7424daf9c8bceb32f87c9044ca4c54d1abbc8e76e2ff65c2937e5c11d3e746f
Contents?: true
Size: 491 Bytes
Versions: 2
Compression:
Stored size: 491 Bytes
Contents
require_relative "./test_helper" require "text/soundex" require 'yaml' class SoundexTest < Test::Unit::TestCase def test_cases YAML.load(data_file('soundex.yml')).each do |input, expected_output| assert_equal expected_output, Text::Soundex.soundex(input) end end def test_should_return_nil_for_empty_string assert_nil Text::Soundex.soundex("") end def test_should_return_nil_for_string_with_no_letters assert_nil Text::Soundex.soundex("!@#123") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
text-1.3.1 | test/soundex_test.rb |
text-1.3.0 | test/soundex_test.rb |