Sha256: 8df59718fee5175bc055e7203ac2863ff1fa5aeeb0b08a87df8b5d2e972c0124

Contents?: true

Size: 892 Bytes

Versions: 2

Compression:

Stored size: 892 Bytes

Contents

# encoding: utf-8
#
# This file is part of the bovem gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>.
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
#

require "spec_helper"

describe Bovem::I18n do
  let(:subject) { Bovem::I18n.new(:it, root: "bovem.shell", path: Bovem::Application::LOCALE_ROOT) }

  describe "#method_missing" do
    it "should find translation and format them" do
      expect(subject.copy_move_single_to_directory("A", "B", "C")).to eq("Impossibile eseguire A del file {mark=bright}B{/mark} in {mark=bright}C{/mark} perché è attualmente una cartella.")
    end

    it "should complain about missing translation" do
      expect { subject.foo }.to raise_error(Lazier::Exceptions::MissingTranslation, "Unable to load the translation \"bovem.shell.foo\" for the locale \"it\".")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bovem-4.0.1 spec/bovem/i18n_spec.rb
bovem-4.0.0 spec/bovem/i18n_spec.rb