Sha256: 67b3176668e23644d5dbbca11efefce6edbe10871bda86ce18e082b04b0a3b90
Contents?: true
Size: 1.2 KB
Versions: 4
Compression:
Stored size: 1.2 KB
Contents
# encoding: utf-8 require File.join(File.dirname(__FILE__), 'helper') class InflectorTest < Test::Unit::TestCase #:nodoc: all def test_titleize assert_equal 'Sugar Grove', Geokit::Inflector.titleize('Sugar Grove') assert_equal 'Sugar Grove', Geokit::Inflector.titleize('Sugar grove') assert_equal 'Sugar Grove', Geokit::Inflector.titleize('sugar Grove') assert_equal 'Sugar Grove', Geokit::Inflector.titleize('sugar grove') end def test_titleize_with_unicode assert_equal 'Borås', Geokit::Inflector.titleize('Borås') assert_equal 'Borås', Geokit::Inflector.titleize('borås') assert_equal 'Borås (Abc)', Geokit::Inflector.titleize('Borås (Abc)') assert_equal 'Borås (Abc)', Geokit::Inflector.titleize('Borås (abc)') assert_equal 'Borås (Abc)', Geokit::Inflector.titleize('borås (Abc)') assert_equal 'Borås (Abc)', Geokit::Inflector.titleize('borås (abc)') end def test_url_escape assert_equal '%E4%B8%8A%E6%B5%B7%E5%B8%82%E5%BE%90%E6%B1%87%E5%8C%BA%E6%BC%95%E6%BA%AA%E5%8C%97%E8%B7%AF1111%E5%8F%B7', GeoKit::Inflector.url_escape('上海市徐汇区漕溪北路1111号') assert_equal '%C3%BC%C3%B6%C3%A4', Geokit::Inflector.url_escape('üöä') end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
geokit-1.7.0 | test/test_inflector.rb |
geokit-1.6.7 | test/test_inflector.rb |
geokit-1.6.6 | test/test_inflector.rb |
geokit-1.7.0.rc1 | test/test_inflector.rb |