Class: I18nLoadPathTest
- Defined in:
- lib/vendor/i18n/test/i18n_load_path_test.rb
Instance Method Summary collapse
-
#setup ⇒ Object
include Tests::Backend::Simple::Setup::Base.
- #test_adding_arrays_of_filenames_to_load_path_do_not_break_locale_loading ⇒ Object
- #test_nested_load_paths_do_not_break_locale_loading ⇒ Object
Instance Method Details
#setup ⇒ Object
include Tests::Backend::Simple::Setup::Base
8 9 10 11 12 |
# File 'lib/vendor/i18n/test/i18n_load_path_test.rb', line 8 def setup I18n.locale = :en I18n.backend = I18n::Backend::Simple.new backend_store_translations(:en, :foo => {:bar => 'bar', :baz => 'baz'}) end |
#test_adding_arrays_of_filenames_to_load_path_do_not_break_locale_loading ⇒ Object
19 20 21 22 |
# File 'lib/vendor/i18n/test/i18n_load_path_test.rb', line 19 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 |