Sha256: e386f774748a7871fd2bc0261c61eb4de405846052f48b995f2bb1b3982b3cc8
Contents?: true
Size: 687 Bytes
Versions: 3
Compression:
Stored size: 687 Bytes
Contents
# encoding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/test_helper') class I18nLoadPathTest < Test::Unit::TestCase # include Tests::Backend::Simple::Setup::Base def setup I18n.locale = :en I18n.backend = I18n::Backend::Simple.new backend_store_translations(:en, :foo => {:bar => 'bar', :baz => 'baz'}) end def test_nested_load_paths_do_not_break_locale_loading I18n.load_path = [[locales_dir + '/en.yml']] assert_equal "baz", I18n.t(:'foo.bar') end def test_adding_arrays_of_filenames_to_load_path_do_not_break_locale_loading I18n.load_path << Dir[locales_dir + '/*.{rb,yml}'] assert_equal "baz", I18n.t(:'foo.bar') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
theoooo-i18n-0.2.0 | test/i18n_load_path_test.rb |
theoooo-i18n-0.2.1 | test/i18n_load_path_test.rb |
theoooo-i18n-0.2.2 | test/i18n_load_path_test.rb |