Sha256: 1cef15c73b695966d59dd9c700217faeac340844e1ae1ec971e32ade17ef80dc

Contents?: true

Size: 525 Bytes

Versions: 31

Compression:

Stored size: 525 Bytes

Contents

require 'abstract_unit'

class LocalizedController < ActionController::Base
  def hello_world
  end
end

class LocalizedTemplatesTest < ActionController::TestCase
  tests LocalizedController

  teardown { I18n.locale = :en }

  def test_localized_template_is_used
    I18n.locale = :de
    get :hello_world
    assert_equal "Gutten Tag", @response.body
  end

  def test_default_locale_template_is_used_when_locale_is_missing
    I18n.locale = :dk
    get :hello_world
    assert_equal "Hello World", @response.body
  end
end

Version data entries

31 entries across 31 versions & 8 rubygems

Version Path
actionpack-2.3.18 test/controller/localized_templates_test.rb
actionpack-2.3.17-rack-upgrade-2.3.17 test/controller/localized_templates_test.rb
actionpack-2.3.17 test/controller/localized_templates_test.rb
actionpack-2.3.16 test/controller/localized_templates_test.rb
actionpack-rack-upgrade-2-2.3.16 test/controller/localized_templates_test.rb
actionpack-rack-upgrade-2-2.3.15 test/controller/localized_templates_test.rb
actionpack-2.3.15 test/controller/localized_templates_test.rb
actionpack-rack-upgrade-2.3.16 test/controller/localized_templates_test.rb
actionpack-rack-upgrade-2.3.15 test/controller/localized_templates_test.rb
actionpack-rack-upgrade-2.3.14 test/controller/localized_templates_test.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/actionpack-2.3.14/test/controller/localized_templates_test.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/actionpack-2.3.12/test/controller/localized_templates_test.rb
actionpack-2.3.14 test/controller/localized_templates_test.rb
kajam-1.0.3.rc2 vendor/rails/actionpack/test/controller/localized_templates_test.rb
actionpack-2.3.12 test/controller/localized_templates_test.rb
radiant-1.0.0.rc2 vendor/rails/actionpack/test/controller/localized_templates_test.rb
radiant-1.0.0.rc1 vendor/rails/actionpack/test/controller/localized_templates_test.rb
actionpack-2.3.11 test/controller/localized_templates_test.rb
radiantcms-couchrest_model-0.1.4 vendor/rails/actionpack/test/controller/localized_templates_test.rb
radiantcms-couchrest_model-0.1.3 vendor/rails/actionpack/test/controller/localized_templates_test.rb