Class: WikiWordsTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
app/models/wiki_words_test.rb

Instance Method Summary collapse

Instance Method Details

#test_pimki_wiki_wordsObject



13
14
15
16
17
18
19
20
21
# File 'app/models/wiki_words_test.rb', line 13

def test_pimki_wiki_words
  assert_equal "XYZ", WikiWords.separate("XYZ")
  assert_equal "WXYZ", WikiWords.separate("WXYZ")
  assert_equal "XYZ to XML", WikiWords.separate("XYZ to XML")
  assert_equal "WXYZ to XML", WikiWords.separate("WXYZ to XML")
  assert_equal "XML Schema Stuff", WikiWords.separate("XMLSchemaStuff")
  assert_equal "Schema XML Stuff", WikiWords.separate("SchemaXMLStuff")
  assert_equal "Schema Stuff XML", WikiWords.separate("SchemaStuffXML")
end

#test_utf8_characters_in_wiki_wordObject



6
7
8
9
10
11
# File 'app/models/wiki_words_test.rb', line 6

def test_utf8_characters_in_wiki_word
  assert_equal "Æåle Øen", WikiWords.separate("ÆåleØen")
  assert_equal "ÆÅØle Øen", WikiWords.separate("ÆÅØleØen")
  assert_equal "Æe ÅØle Øen", WikiWords.separate("ÆeÅØleØen")
  assert_equal "Legetøj", WikiWords.separate("Legetøj")
end