Sha256: 35b7f5cfd6ea70116947ce909afe942511897eee0dc3d310b836999401b5890e

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

# -*- encoding: utf-8 -*-

require File.dirname(__FILE__) + '/spec_helper'

describe Russian, "loading locales" do
  before(:all) do
    Russian.init_i18n
  end

  %w(
    date.formats.default
    date.formats.short
    date.formats.long
    date.day_names
    date.standalone_day_names
    date.abbr_day_names
    date.month_names
    date.standalone_month_names
    date.abbr_month_names
    date.standalone_abbr_month_names
    date.order

    time.formats.default
    time.formats.short
    time.formats.long
    time.am
    time.pm
  ).each do |key|
    it "should define '#{key}' in datetime translations" do
      lookup(key).should_not be_nil
    end
  end

  it "should load pluralization rules" do
    lookup(:'i18n.plural.rule').should_not be_nil
    lookup(:'i18n.plural.rule').is_a?(Proc).should be_true
  end

  it "should load transliteration rule" do
    lookup(:'i18n.transliterate.rule').should_not be_nil
    lookup(:'i18n.transliterate.rule').is_a?(Proc).should be_true
  end

  def lookup(*args)
    I18n.backend.send(:lookup, Russian.locale, *args)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rs_russian-0.8.1 spec/locale_spec.rb
rs_russian-0.8.0 spec/locale_spec.rb
rs_russian-0.7.2 spec/locale_spec.rb
rs_russian-0.7.1 spec/locale_spec.rb