Class: I18nSimpleBackendAvailableLocalesTest

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

Instance Method Summary collapse

Instance Method Details

#test_available_localesObject



128
129
130
131
132
133
134
# File 'lib/active_support/vendor/i18n-0.1.3/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