Sha256: e0865c42e12f3856b1df2f60c92dbd914ba1dc6525e7788fc50495117851bcae
Contents?: true
Size: 696 Bytes
Versions: 12
Compression:
Stored size: 696 Bytes
Contents
current_folder = File.dirname(__FILE__) require File.join(current_folder,'..','spec_helper') include FastGettext de_file = File.join(current_folder,'..','locale','de','LC_MESSAGES','test.mo') de = MoFile.new(de_file) describe 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',1).should == 'Achse' #singular de.plural('Axis','Axis',2).should == 'Achsen' #plurals end it "can access plurals through []" do de['Axis'].should == 'Achse' #singular end end
Version data entries
12 entries across 12 versions & 1 rubygems