aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorChristopher Dell <chris@tigrish.com>2012-03-05 18:29:03 +0100
committerChristopher Dell <chris@tigrish.com>2012-03-05 18:29:03 +0100
commit922c9e2d27dfb3d01c7c576b299ffca966c1fb87 (patch)
treeef55818d61720b755fc7cb95925a10df52fd2c03 /activerecord
parent0eada113c30953f93cf7d7969b10cfd8a7e417ae (diff)
downloadrails-922c9e2d27dfb3d01c7c576b299ffca966c1fb87.tar.gz
rails-922c9e2d27dfb3d01c7c576b299ffca966c1fb87.tar.bz2
rails-922c9e2d27dfb3d01c7c576b299ffca966c1fb87.zip
Tweak activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/validations/i18n_generate_message_validation_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
index 136a336cec..a8e513d81f 100644
--- a/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
+++ b/activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
@@ -8,11 +8,12 @@ class I18nGenerateMessageValidationTest < ActiveRecord::TestCase
I18n.backend = I18n::Backend::Simple.new
end
- def reset_i18n_load_path(&block)
+ def reset_i18n_load_path
@old_load_path, @old_backend = I18n.load_path.dup, I18n.backend
I18n.load_path.clear
I18n.backend = I18n::Backend::Simple.new
yield
+ ensure
I18n.load_path.replace @old_load_path
I18n.backend = @old_backend
end