Sha256: 431e310a67af69bbe037ace31af2657199f2fc108b01bd88d2a6afd9e8211c28
Contents?: true
Size: 710 Bytes
Versions: 5
Compression:
Stored size: 710 Bytes
Contents
require File.expand_path('spec/spec_helper') de_file = File.join('spec','locale','de','LC_MESSAGES','test.mo') de = FastGettext::MoFile.new(de_file) describe FastGettext::MoFile do before :all do File.exist?(de_file).should == true end it "parses a file" do de['car'].should == 'Auto' end it "stores untranslated values as nil" do de['Car|Model'].should == nil end it "finds pluralized values" do de.plural('Axis','Axis').should == ['Achse','Achsen'] end it "returns empty array when pluralisation could not be found" do de.plural('Axis','Axis','Axis').should == [] end it "can access plurals through []" do de['Axis'].should == 'Achse' #singular end end
Version data entries
5 entries across 5 versions & 1 rubygems