Sha256: 4e201227210ac7675e273e1baa44846026e362d259eacbad1a7bd877ae505f8c
Contents?: true
Size: 711 Bytes
Versions: 8
Compression:
Stored size: 711 Bytes
Contents
describe 'Iconv' do before do @fake_load_path = File.join('spec','fast_gettext','vendor','fake_load_path') end after do $LOAD_PATH.delete @fake_load_path end it "also works when Iconv was not found locally" do #prepare load path $LOAD_PATH.unshift @fake_load_path test = 1 begin require 'iconv' rescue LoadError test = 2 end test.should == 2 #load fast_gettext require 'fast_gettext' FastGettext.add_text_domain('test',:path=>File.join('spec','locale')) FastGettext.text_domain = 'test' FastGettext.available_locales = ['en','de'] FastGettext.locale = 'de' #translate FastGettext._('car').should == 'Auto' end end
Version data entries
8 entries across 8 versions & 1 rubygems