Sha256: dd78bd5ee5bed0c869b3127782ade2db2e7e630a053e6c921f689b480d0baa05
Contents?: true
Size: 999 Bytes
Versions: 27
Compression:
Stored size: 999 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' describe TwitterCldr::Transforms::Transliterator do describe '#transliterate' do let(:source_locale) { 'ja' } let(:target_locale) { 'en' } let(:string) { 'くろねこさまボクシサン' } let(:transliterator) { described_class.new(string, source_locale, target_locale) } it 'identifies and transliterates all the scripts in the string' do expect(transliterator.transliterate).to( match_normalized('kuronekosamabokushisan') ) 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
27 entries across 27 versions & 1 rubygems