Sha256: 7baba488fc95bf4be7871d1808546ccd866723dfa0d0a95f8b6934645a23dec1
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
# coding: utf-8 require "spec_helper" describe Tataki::Converter::Combine do let(:skk_converter) { Tataki::Converter::SkkJisyo.new } let(:alphabet_converter) { Tataki::Converter::Alphabet.new } describe ".to_kana" do shared_examples "converts_kana" do |sentence, kana| it "converts #{sentence.inspect} to #{kana.inspect}" do expect(converter.to_kana(sentence)).to eq(kana) end end context "when skk-jisyo + alphabet" do let(:converter) do Tataki::Converter::Combine.new(skk_converter, alphabet_converter) end include_examples "converts_kana", "X線の研究をしています", "えっくすせんのけんきゅうをしています" include_examples "converts_kana", "X線研究者", "えっくすせんけんきゅうしゃ" include_examples "converts_kana", "電気通信大学X線研究", "でんきつうしんだいがくえっくすせんけんきゅう" include_examples "converts_kana", "DNAは螺旋状の構造らしい", "でぃーえぬえーはらせんじょうのこうぞうらしい" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tataki-0.0.4 | spec/tataki/converters/combine_spec.rb |