Sha256: e8822f06878e2385652a0c2607915cfc87dd18ccda509148756bab5b175d1353

Contents?: true

Size: 708 Bytes

Versions: 33

Compression:

Stored size: 708 Bytes

Contents

current_folder = File.dirname(__FILE__)
$LOAD_PATH.unshift File.expand_path("../../lib", current_folder)

describe 'Iconv' do
  it "also works when Iconv was not found locally" do
    #prepare load path
    $LOAD_PATH.unshift File.join(current_folder,'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(File.dirname(__FILE__),'..','locale'))
    FastGettext.text_domain = 'test'
    FastGettext.available_locales = ['en','de']
    FastGettext.locale = 'de'

    #translate
    FastGettext._('car').should == 'Auto'
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
grosser-fast_gettext-0.2.10 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.2.11 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.2.5 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.2.6 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.2.7 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.2.8 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.0 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.1 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.2 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.3 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.4 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.5 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.6 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.7 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.3.8 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.4.0 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.4.10 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.4.11 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.4.12 spec/vendor/iconv_spec.rb
grosser-fast_gettext-0.4.13 spec/vendor/iconv_spec.rb