Sha256: 2d78af07bb1e907ee8382ce67d66c566222cd3895091774120c1f3e4f4969f3b
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
# encoding: utf-8 describe Assertion::I18n, "#translate" do subject { fn[input] } let(:fn) { described_class[:translate, scope, args] } let(:args) { { foo: :FOO } } let(:scope) { double } let(:input) { double } let(:output) { double } before do allow(::I18n) .to receive(:t) .with(input, foo: :FOO, scope: scope) .and_return output end it "doesn't mutate the input" do expect { subject }.not_to change { input } end it "returns the string converted to snake case" do expect(subject).to eql output end end # describe Assertion::I18n#translate
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
assertion-0.0.1 | spec/unit/assertion/transprocs/i18n/translate_spec.rb |