test/test_helper.rb in delocalize-1.1.0 vs test/test_helper.rb in delocalize-1.2.0
- old
+ new
@@ -5,13 +5,15 @@
Bundler.require(:default, :development)
require 'minitest/autorun'
require 'minitest/spec'
-require 'mocha/setup'
require 'rails'
+# We need to explicitly load ActiveSupport's version of Hash#slice since Rails 3.2 somehow loads
+# i18n's version first which is different from Rails' (see https://github.com/svenfuchs/i18n/commit/24e71a9a4901ed18c9cab5c53109fd9bf2416bcb).
+require 'active_support/core_ext/hash/slice'
de = {
:date => {
:input => {
:formats => [:long, :short, :short_with_name, :default]
@@ -63,6 +65,7 @@
tt[:date][:formats][:default] = '%d|%m|%Y'
I18n.backend.store_translations :de, de
I18n.backend.store_translations :tt, tt
+I18n.default_locale = :de
I18n.locale = :de