1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Be sure to dup load paths before clearing the array.

This commit is contained in:
José Valim 2010-01-07 02:37:42 +01:00
parent c68cc49dcd
commit b0572ab2b6
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class I18nValidationTest < ActiveModel::TestCase
Person.reset_callbacks(:validate)
@person = Person.new
@old_load_path, @old_backend = I18n.load_path, I18n.backend
@old_load_path, @old_backend = I18n.load_path.dup, I18n.backend
I18n.load_path.clear
I18n.backend = I18n::Backend::Simple.new
I18n.backend.store_translations('en', :errors => {:messages => {:custom => nil}})

View file

@ -8,7 +8,7 @@ class I18nValidationTest < ActiveRecord::TestCase
def setup
Reply.validates_presence_of(:title)
@topic = Topic.new
@old_load_path, @old_backend = I18n.load_path, I18n.backend
@old_load_path, @old_backend = I18n.load_path.dup, I18n.backend
I18n.load_path.clear
I18n.backend = I18n::Backend::Simple.new
I18n.backend.store_translations('en', :errors => {:messages => {:custom => nil}})