Sha256: 17e4e7eba0c8c35e2161196758c5dbe528e3ade0d13600a674d766f4f8c9fa11
Contents?: true
Size: 1009 Bytes
Versions: 13
Compression:
Stored size: 1009 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' include TwitterCldr::Transforms describe Transliterator do describe '#transliterate' do let(:source_locale) { 'ja' } let(:target_locale) { 'en' } let(:string) { 'くろねこさまボクシサン' } let(:transliterator) { Transliterator.new(string, source_locale, target_locale) } it 'identifies and transliterates all the scripts in the string' do expect(transliterator.transliterate).to( match_normalized('kuronekosamaho゙kushisan') ) end context 'with a specific script' do let(:source_locale) { 'ru_Cyrl' } let(:target_locale) { 'en' } let(:string) { 'くろねこさま Руссиа' } it "doesn't transliterate all scripts if a script is explicitly specified" do expect(transliterator.transliterate).to( match_normalized('くろねこさま Russia') ) end end end end
Version data entries
13 entries across 13 versions & 2 rubygems