From cd92e74cef27992471e550eea2d4891d4b49dca0 Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Tue, 14 Apr 2015 14:58:39 -0300 Subject: [PATCH] Revert "[WIP] Fixing locale unit test" --- config/application.rb | 1 - spec/controllers/home_controller_spec.rb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/application.rb b/config/application.rb index 509d2f6..7d9b0b4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -19,7 +19,6 @@ module Mezuro # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de - config.available_locales = ['en', 'pt-BR'] config.i18n.enforce_available_locales = true # Do not swallow errors in after_commit/after_rollback callbacks. diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index e7cdf18..77a4ac3 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -18,7 +18,7 @@ describe HomeController, :type => :controller do it 'should automatically use the language specified in the request headers' do request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR' get :index - expect(I18n.locale).to eq(:"pt-BR") + expect(I18n.locale).to eq(:pt) end it 'should use a different region if still the best match' do @@ -28,7 +28,7 @@ describe HomeController, :type => :controller do end it 'should use the default language if no available language matches the requested one' do - request.env['HTTP_ACCEPT_LANGUAGE'] = 'la' + request.env['HTTP_ACCEPT_LANGUAGE'] = 'de' get :index expect(I18n.locale).to eq(:en) end -- libgit2 0.21.2