Permalink
Browse files

Fix test and remove "cakes" dictionary

  • Loading branch information...
1 parent f82271f commit b0dac41ed09d93840264bbf4045992c65fe8fa1b @ahx committed Apr 17, 2012
Showing with 6 additions and 27 deletions.
  1. +1 −1 README.rdoc
  2. 0 test/cakes.aff
  3. +0 −21 test/cakes.dic
  4. +5 −5 test/test_hunspell.rb
View
2 README.rdoc
@@ -30,7 +30,7 @@ On Debian:
dict = Hunspell.new("/path/to/dictionaries", "en_US")
# directly specify dictionaries (legacy)
- dict = Hunspell.new("path/to/cakes.aff", "path/to/cakes.dic")
+ dict = Hunspell.new("path/to/dictionaries/en_US.aff", "path/to/dictionaries/en_US.dic")
dict.spell("walked") # => true same as #check, #check?
dict.spell("woked") # => false
View
0 test/cakes.aff
No changes.
View
21 test/cakes.dic
@@ -1,21 +0,0 @@
-20
-Apfelkuchen
-Baumkuchen
-Bienenstich
-Butterkuchen
-Donauwelle
-Eierschecke
-Guglhupf
-Hefekuchen
-Käsekuchen
-Marmorkuchen
-Obstkuchen
-Panettone
-Pflaumenkuchen
-Russischer Zupfkuchen
-Rührkuchen
-Sandkuchen
-Schmandkuchen
-Stollen
-Streuselkuchen
-Zwiebelkuchen
View
10 test/test_hunspell.rb
@@ -13,10 +13,10 @@ def test_initialize
end
def test_initialize_legacy
- h = Hunspell.new("#{@dict_dir}/cakes.aff", "#{@dict_dir}/cakes.dic")
+ h = Hunspell.new("#{@dict_dir}/en_US.aff", "#{@dict_dir}/en_US.dic")
- assert_equal File.join(@dict_dir, "cakes.aff"), h.affix
- assert_equal File.join(@dict_dir, "cakes.dic"), h.dictionary
+ assert_equal File.join(@dict_dir, "en_US.aff"), h.affix
+ assert_equal File.join(@dict_dir, "en_US.dic"), h.dictionary
end
def test_initialize_missing
@@ -29,7 +29,7 @@ def test_initialize_missing
end
def test_analyze
- assert_equal [" st:Baumkuchen"], @dict.analyze("Baumkuchen")
+ assert_equal [" st:hello"], @dict.analyze("hello")
end
def test_basic_spelling
@@ -104,6 +104,6 @@ def test_find_langauge_LC_MESSAGES
end
def test_stem
- assert_equal %w[Baumkuchen], @dict.stem("Baumkuchen")
+ assert_equal %w[hello], @dict.stem("hello")
end
end

0 comments on commit b0dac41

Please sign in to comment.