Permalink
Browse files

Tweak activerecord/test/cases/validations/i18n_generate_message_valid…

…ation_test.rb
  • Loading branch information...
1 parent 0eada11 commit 922c9e2d27dfb3d01c7c576b299ffca966c1fb87 @tigrish tigrish committed Mar 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/test/cases/validations/i18n_generate_message_validation_test.rb
@@ -8,11 +8,12 @@ def setup
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

0 comments on commit 922c9e2

Please sign in to comment.