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

Don't define _test_case method if already defined.

This commit is contained in:
Emilio Tagua 2010-09-28 15:21:44 -03:00
parent 4bce8e3c75
commit 8ee27afd06

View file

@ -137,8 +137,10 @@ module ActionView
def make_test_case_available_to_view!
test_case_instance = self
_helpers.module_eval do
define_method(:_test_case) { test_case_instance }
private :_test_case
unless private_method_defined?(:_test_case)
define_method(:_test_case) { test_case_instance }
private :_test_case
end
end
end