text 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/lib/text/version.rb +1 -1
- data/test/{test_levenshtein.rb → levenshtein_test.rb} +1 -1
- data/test/{test_metaphone.rb → metaphone_test.rb} +1 -1
- data/test/{test_porter_stemming.rb → porter_stemming_test.rb} +1 -1
- data/test/{test_soundex.rb → soundex_test.rb} +1 -1
- data/test/{preamble.rb → test_helper.rb} +1 -1
- data/test/{test_text.rb → text_test.rb} +1 -1
- data/test/{test_white_similarity.rb → white_similarity_test.rb} +1 -1
- metadata +27 -18
- data/lib/text/figlet.rb +0 -17
- data/lib/text/figlet/font.rb +0 -119
- data/lib/text/figlet/smusher.rb +0 -65
- data/lib/text/figlet/typesetter.rb +0 -69
- data/test/data/big.flf +0 -2204
- data/test/test_double_metaphone.rb +0 -17
- data/test/test_figlet.rb +0 -18
@@ -1,17 +0,0 @@
|
|
1
|
-
require "preamble"
|
2
|
-
require "text/double_metaphone"
|
3
|
-
|
4
|
-
require 'csv'
|
5
|
-
|
6
|
-
class DoubleMetaphoneTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def test_cases
|
9
|
-
CSV.open(data_file_path('double_metaphone.csv'), 'r').to_a.each do |row|
|
10
|
-
primary, secondary = Text::Metaphone.double_metaphone(row[0])
|
11
|
-
|
12
|
-
assert_equal row[1], primary
|
13
|
-
assert_equal row[2], secondary.nil?? primary : secondary
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
data/test/test_figlet.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'preamble')
|
2
|
-
|
3
|
-
class FigletTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
if !Text.is_19?
|
6
|
-
def test_hello_world
|
7
|
-
font = Text::Figlet::Font.new(File.rel('data', 'big.flf'))
|
8
|
-
figlet = Text::Figlet::Typesetter.new(font)
|
9
|
-
assert_equal File.read(File.rel('data', 'big.txt')), figlet['Hello World']
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_no_smushing
|
13
|
-
font = Text::Figlet::Font.new(File.rel('data', 'chunky.flf'))
|
14
|
-
figlet = Text::Figlet::Typesetter.new(font, :smush => false)
|
15
|
-
assert_equal File.read(File.rel('data', 'chunky.txt')), figlet['Chunky Bacon']
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|