Sha256: 13c0875de3e266b98bac731230ac65d67366c5420404c91f999c43c630af6c6d
Contents?: true
Size: 597 Bytes
Versions: 9
Compression:
Stored size: 597 Bytes
Contents
require "spec_helper" describe I18n::HumanizeMissingTranslations do describe ".call" do context "when exception is I18n::MissingTranslation" do it "humanizes missing translations" do expect(I18n.t("some.missing translation")).to eq("Missing translation") end end context "when exception is not I18n::MissingTranslation" do it "does not intercept it" do allow(I18n::Backend::Transliterator).to receive(:get).and_raise(I18n::ArgumentError) expect{I18n.transliterate("error?")}.to raise_error(I18n::ArgumentError) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems