Class: I18nSimpleBackendAvailableLocalesTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/vendor/i18n/test/simple_backend_test.rb

Instance Method Summary collapse

Instance Method Details

#test_available_localesObject



128
129
130
131
132
133
134
# File 'lib/vendor/i18n/test/simple_backend_test.rb', line 128

def test_available_locales
  @backend = I18n::Backend::Simple.new
  @backend.store_translations 'de', :foo => 'bar'
  @backend.store_translations 'en', :foo => 'foo'

  assert_equal ['de', 'en'], @backend.available_locales.map{|locale| locale.to_s }.sort
end