Sha256: d43face204c4e34f5bc9cf50b55fe2a0c93ad21d1dce61436079a2813882560f

Contents?: true

Size: 634 Bytes

Versions: 1

Compression:

Stored size: 634 Bytes

Contents

current_folder = File.dirname(__FILE__)
require File.join(current_folder,'..','..','spec_helper')


describe 'FastGettext::TranslationRepository::Po' do
  before do
    @rep = FastGettext::TranslationRepository.build('test',:path=>File.join(current_folder,'..','..','locale'),:type=>:po)
    @rep.is_a? FastGettext::TranslationRepository::Po
  end
  it "can be built" do
    @rep.available_locales.should == ['de','en']
  end
  it "can translate" do
    FastGettext.locale = 'de'
    @rep['car'].should == 'Auto'
  end
  it "can pluralize" do
    FastGettext.locale = 'de'
    @rep.plural('Axis','Axis',2).should == 'Achsen'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grosser-fast_gettext-0.2.11 spec/fast_gettext/translation_repository/po_spec.rb